public class SelectStatement extends SQLStatement
Constructor and Description |
---|
SelectStatement(ArrayList<Object> selectList,
ArrayList<Table> fromList,
ConditionalExpression where,
Limit limit,
Boolean distinctSpecified)
Constructs a SelectStatement object involving the specified
columns and other objects from the SELECT clause, the specified
tables from the FROM clause, the specified conditional
expression from the WHERE clause (if any), the specified Limit
object summarizing the LIMIT clause (if any), and the specified
value indicating whether or not we should eliminate duplicates.
|
Modifier and Type | Method and Description |
---|---|
boolean |
distinctSpecified()
Returns a boolean value indicating whether duplicates should be
eliminated in the result of this statement -- i.e., whether the
user specified SELECT DISTINCT.
|
void |
execute()
Executes this SQL statement.
|
addColumn, addColumnVal, addTable, getColumn, getColumnVal, getTable, getWhere, getWhereColumn, numColumns, numColumnVals, numTables, numWhereColumns, toString
public static final String STAR
public SelectStatement(ArrayList<Object> selectList, ArrayList<Table> fromList, ConditionalExpression where, Limit limit, Boolean distinctSpecified)
selectList
- the columns and other objects from the SELECT clausefromList
- the list of tables from the FROM clausewhere
- the conditional expression from the WHERE clause (if any)limit
- summarizes the info in the LIMIT clause (if any)distinctSpecified
- should duplicates be eliminated?public boolean distinctSpecified()
public void execute() throws DatabaseException, DeadlockException
SQLStatement
execute
in class SQLStatement
DatabaseException
- if Berkeley DB encounters another problem
accessing an underlying database.DeadlockException
- if deadlock occurs while accessing
an underlying database.