Package com.mckoi.database.interpret
Class SelectColumn
- java.lang.Object
-
- com.mckoi.database.interpret.SelectColumn
-
- All Implemented Interfaces:
StatementTreeObject,java.io.Serializable,java.lang.Cloneable
public final class SelectColumn extends java.lang.Object implements java.io.Serializable, StatementTreeObject, java.lang.Cloneable
Represents a column selected to be in the output of a select statement. This includes being either an aggregate function, a column or "*" which is the entire set of columns.- Author:
- Tobias Downer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringaliasThe alias of this column string.ExpressionexpressionThe expression of this column.java.lang.Stringglob_nameIf the column represents a glob of columns (eg.Variableinternal_nameThe name of this column used internally to reference it.Variableresolved_nameThe fully resolved name that this column is given in the resulting table.
-
Constructor Summary
Constructors Constructor Description SelectColumn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Performs a DEEP clone of this object if it is mutable, or a deep clone of its mutable members.voidprepareExpressions(ExpressionPreparer preparer)Prepares all expressions in this statement tree object by passing the ExpressionPreparer object to the 'prepare' method of the expression.java.lang.StringtoString()
-
-
-
Field Detail
-
glob_name
public java.lang.String glob_name
If the column represents a glob of columns (eg. 'Part.*' or '*') then this is set to the glob string and 'expression' is left blank.
-
resolved_name
public Variable resolved_name
The fully resolved name that this column is given in the resulting table.
-
alias
public java.lang.String alias
The alias of this column string.
-
expression
public Expression expression
The expression of this column. This is only NOT set when name == "*" indicating all the columns.
-
internal_name
public Variable internal_name
The name of this column used internally to reference it.
-
-
Method Detail
-
prepareExpressions
public void prepareExpressions(ExpressionPreparer preparer) throws DatabaseException
Description copied from interface:StatementTreeObjectPrepares all expressions in this statement tree object by passing the ExpressionPreparer object to the 'prepare' method of the expression.- Specified by:
prepareExpressionsin interfaceStatementTreeObject- Throws:
DatabaseException
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from interface:StatementTreeObjectPerforms 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:
clonein interfaceStatementTreeObject- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-