Package com.mckoi.database.interpret
Class TableSelectExpression
java.lang.Object
com.mckoi.database.interpret.TableSelectExpression
- All Implemented Interfaces:
StatementTreeObject
,Serializable
,Cloneable
public final class TableSelectExpression
extends Object
implements Serializable, StatementTreeObject, Cloneable
A container object for the a table select expression, eg.
SELECT [columns] FROM [tables] WHERE [search_clause] GROUP BY [column] HAVING [search_clause] [composite_function] [table_select_expression]
Note that a TableSelectExpression can be nested in the various clauses of this object.
- Author:
- Tobias Downer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe list of columns to select from.boolean
True if we only search for distinct elements.The from clause.The list of columns to group by.The group max variable or null if no group max.The having clause.The where clause. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
chainComposite
(TableSelectExpression expression, String composite, boolean is_all) Chains a new composite function to this expression.clone()
Performs a DEEP clone of this object if it is mutable, or a deep clone of its mutable members.void
prepareExpressions
(ExpressionPreparer preparer) Prepares all expressions in this statement tree object by passing the ExpressionPreparer object to the 'prepare' method of the expression.
-
Field Details
-
distinct
public boolean distinctTrue if we only search for distinct elements. -
columns
The list of columns to select from. (SelectColumn) -
from_clause
The from clause. -
where_clause
The where clause. -
group_by
The list of columns to group by. (ByColumn) -
group_max
The group max variable or null if no group max. -
having_clause
The having clause.
-
-
Constructor Details
-
TableSelectExpression
public TableSelectExpression()Constructor.
-
-
Method Details
-
chainComposite
Chains a new composite function to this expression. For example, if this expression is a UNION ALL with another expression it would be set through this method. -
prepareExpressions
Description copied from interface:StatementTreeObject
Prepares all expressions in this statement tree object by passing the ExpressionPreparer object to the 'prepare' method of the expression.- Specified by:
prepareExpressions
in interfaceStatementTreeObject
- Throws:
DatabaseException
-
clone
Description copied from interface:StatementTreeObject
Performs a DEEP clone of this object if it is mutable, or a deep clone of its mutable members. If the object is immutable then it may return 'this'.- Specified by:
clone
in interfaceStatementTreeObject
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-