|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.d2rq.sql.SelectStatementBuilder
public class SelectStatementBuilder
Collects parts of a SELECT query and delivers a corresponding SQL statement. Used within TripleResultSets.
Constructor Summary | |
---|---|
SelectStatementBuilder(ConnectedDB database)
TODO: Try if we can change parameters to (Relation, projectionColumns) and make immutable |
Method Summary | |
---|---|
void |
addAliasMap(AliasMap newAliases)
|
void |
addCondition(Expression condition)
Adds a WHERE clause to the query. |
void |
addRelation(Relation relation)
|
void |
addSelectColumn(Attribute column)
Adds a column to the SELECT part of the query. |
void |
addSelectColumns(Set columns)
Adds a list of Attribute s to the SELECT part of the query |
ClosableIterator |
execute()
|
ConnectedDB |
getDatabase()
|
String |
getSQLStatement()
|
boolean |
isEmpty()
|
boolean |
isTrivial()
|
void |
setEliminateDuplicates(boolean eliminateDuplicates)
Sets if the SQL statement should eliminate duplicate rows ("SELECT DISTINCT"). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelectStatementBuilder(ConnectedDB database)
Method Detail |
---|
public void addRelation(Relation relation)
public ConnectedDB getDatabase()
public boolean isTrivial()
public boolean isEmpty()
public String getSQLStatement()
public void addAliasMap(AliasMap newAliases)
public void addSelectColumn(Attribute column)
column
- the columnpublic void addSelectColumns(Set columns)
Attribute
s to the SELECT part of the query
columns
- public void addCondition(Expression condition)
condition
- An SQL expressionpublic void setEliminateDuplicates(boolean eliminateDuplicates)
eliminateDuplicates
- enable DISTINCT?public ClosableIterator execute()
ResultRow
s
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |