Class Select
- java.lang.Object
-
- org.dashbuilder.dataprovider.sql.model.SQLStatement<Select>
-
- org.dashbuilder.dataprovider.sql.model.Select
-
public class Select extends SQLStatement<Select>
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Column>columnsprotected StringfromSelectprotected List<Column>groupBysprotected intlimitprotected intoffsetprotected booleanoffsetPostProcessingprotected List<SortColumn>orderBysprotected List<String>quotedFieldsprotected List<Condition>wheres-
Fields inherited from class org.dashbuilder.dataprovider.sql.model.SQLStatement
_columnsRefs, connection, dialect, table
-
-
Constructor Summary
Constructors Constructor Description Select(Connection connection, Dialect dialect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Selectcolumns(Collection<Column> cols)Selectcolumns(Column... cols)<R> Rfetch(ResultSetConsumer<R> consumer)intfetchCount()Selectfrom(String sql)Selectfrom(Table table)List<Column>getColumns()StringgetFromSelect()TablegetFromTable()List<Column>getGroupBys()intgetLimit()intgetOffset()List<SortColumn>getOrderBys()StringgetSQL()List<Condition>getWheres()SelectgroupBy(Column column)booleanisOffsetPostProcessing()Selectlimit(int limit)Selectoffset(int offset)SelectorderBy(List<SortColumn> columns)SelectorderBy(SortColumn... columns)voidsetOffsetPostProcessing(boolean offsetPostProcessing)StringtoString()Selectwhere(Condition condition)-
Methods inherited from class org.dashbuilder.dataprovider.sql.model.SQLStatement
fix, fix, fix, fixCase, fixColumns, getConnection, getDialect, getTable, table
-
-
-
-
Field Detail
-
fromSelect
protected String fromSelect
-
orderBys
protected List<SortColumn> orderBys
-
limit
protected int limit
-
offset
protected int offset
-
offsetPostProcessing
protected boolean offsetPostProcessing
-
-
Constructor Detail
-
Select
public Select(Connection connection, Dialect dialect)
-
-
Method Detail
-
isOffsetPostProcessing
public boolean isOffsetPostProcessing()
-
setOffsetPostProcessing
public void setOffsetPostProcessing(boolean offsetPostProcessing)
-
getFromSelect
public String getFromSelect()
-
getFromTable
public Table getFromTable()
-
getOrderBys
public List<SortColumn> getOrderBys()
-
getLimit
public int getLimit()
-
getOffset
public int getOffset()
-
columns
public Select columns(Collection<Column> cols)
-
orderBy
public Select orderBy(SortColumn... columns)
-
orderBy
public Select orderBy(List<SortColumn> columns)
-
limit
public Select limit(int limit)
-
offset
public Select offset(int offset)
-
getSQL
public String getSQL()
-
fetchCount
public int fetchCount() throws SQLException- Throws:
SQLException
-
fetch
public <R> R fetch(ResultSetConsumer<R> consumer)
-
-