public class SelectEngine extends Object
| Modifier and Type | Field and Description |
|---|---|
private Select |
sql |
private int[] |
tableMap |
private ArrayList |
tasks |
| Constructor and Description |
|---|
SelectEngine(Select select) |
| Modifier and Type | Method and Description |
|---|---|
private Data |
aggregateQuery(Data data)
execute an aggregate query
|
Data |
execute() |
private int |
findTableIndex(Table t,
Table[] tables) |
private Task |
fromClause() |
private Data |
getData()
Resolve the from clause to a single set of data
|
private boolean |
isAggregate()
An aggregate query is true if any function is an aggregate function
|
private void |
mergeData(MemoryData memData,
Object[] _row,
int columnIndex,
RewindableData[] datas,
int[] datasColumnCount,
int dataIndex)
merge the data from several datasets to a single dataset
|
private Data |
nonAggregateQuery(Data data)
non aggregate so simply return the column's wanted
running any function requested
|
private Data |
orderBy(Data data)
sort the data
todo: allow for sorting non-memory data
|
private Object |
resolveColumn(Data data,
Object column)
resolve a column down to it's final value
|
private Data |
where(MemoryData data,
Object where)
execute the where clause
|
private boolean |
whereCheckRow(Data data,
Object where)
Check the where constraint against a single row
|
private boolean |
whereCheckRowConditon(Data data,
Condition condition)
Check a condtion portion of the where constraint against a single row
left and right of conditon is either another condition or an equation
|
private boolean |
whereCheckRowEquation(Data data,
Equation eq)
Check an equation portion of the where contraints against a single row
|
private Task |
whereClause(Task task) |
public SelectEngine(Select select)
public Data execute() throws SQLException
SQLExceptionprivate Task fromClause()
private boolean isAggregate()
private Data aggregateQuery(Data data) throws SQLException
SQLExceptionprivate Data getData() throws SQLException
SQLExceptionprivate void mergeData(MemoryData memData, Object[] _row, int columnIndex, RewindableData[] datas, int[] datasColumnCount, int dataIndex) throws SQLException
SQLExceptionprivate Data nonAggregateQuery(Data data) throws SQLException
SQLExceptionprivate Object resolveColumn(Data data, Object column) throws SQLException
data - the value from the data setcolumn - the object from the sql querySQLExceptionprivate Data orderBy(Data data)
data - private Data where(MemoryData data, Object where) throws SQLException
SQLExceptionprivate boolean whereCheckRow(Data data, Object where) throws SQLException
data - where - SQLExceptionprivate boolean whereCheckRowEquation(Data data, Equation eq) throws SQLException
data - eq - SQLExceptionprivate boolean whereCheckRowConditon(Data data, Condition condition) throws SQLException
data - condition - SQLExceptionCopyright © 2016 Open Microscopy Environment