Package com.mckoi.database.interpret
Class ByColumn
- java.lang.Object
-
- com.mckoi.database.interpret.ByColumn
-
- All Implemented Interfaces:
StatementTreeObject
,java.io.Serializable
,java.lang.Cloneable
public final class ByColumn extends java.lang.Object implements java.io.Serializable, StatementTreeObject, java.lang.Cloneable
Object used to represent a column in the 'order by' and 'group by' clauses of a select statement.- Author:
- Tobias Downer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description boolean
ascending
If 'order by' then true if sort is ascending (default).Expression
exp
The expression that we are ordering by.Variable
name
The name of the column in the 'by'.
-
Constructor Summary
Constructors Constructor Description ByColumn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
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.java.lang.String
toString()
-
-
-
Field Detail
-
name
public Variable name
The name of the column in the 'by'.
-
exp
public Expression exp
The expression that we are ordering by.
-
ascending
public boolean ascending
If 'order by' then true if sort is ascending (default).
-
-
Method Detail
-
prepareExpressions
public void prepareExpressions(ExpressionPreparer preparer) throws DatabaseException
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
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
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 classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-