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.String
alias
The alias of this column string.Expression
expression
The expression of this column.java.lang.String
glob_name
If the column represents a glob of columns (eg.Variable
internal_name
The name of this column used internally to reference it.Variable
resolved_name
The 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.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
-
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: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
-
-