The type of the ResultColumn can differ from its underlying expression, for example in certain joins the ResultColumn can be nullable even if its underlying column is not. In an INSERT or UPDATE the ResultColumn will represent the type of the column in the table, the type of the underlying expression will be the type of the source of the value to be insert or updated. The method columnTypeAndLengthMatch() can be used to detect when normalization is required between the expression and the type of ResultColumn. This class does not implement any type normalization (conversion), this is typically handled by a NormalizeResultSetNode.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private ColumnDescriptor | |
| private String | |
| private ValueNode | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private ColumnReference | |
| private String | |
| private String | |
| private String | |
| private String | |
| private boolean | |
| private boolean | |
| private boolean | |
| private JoinNode | |
| private int | |
| private boolean | |
| private int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | ResultColumn(String
The name of the column, if any. underlyingName, ValueNode The expression this result column represents expression, ContextManager context manager cm)
|
| pack-priv | ResultColumn(ColumnReference
A column reference node cr, ValueNode The expression this result column represents expression, ContextManager context manager cm)
|
| pack-priv | ResultColumn(ColumnDescriptor
The column descriptor cd, ValueNode The expression this result column represents expression, ContextManager context manager cm)
|
| pack-priv | ResultColumn(DataTypeDescriptor
The type of the column dtd, ValueNode The expression this result column represents expression, ContextManager context manager cm)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | acceptChildren(Visitor
the visitor v)Overrides org. Accept the visitor for all visitable children of this node. |
| pack-priv void | adjustVirtualColumnId(int
The adjustment for the virtualColumnId adjust)Adjust the virtualColumnId for this ResultColumn by the specified amount |
| pack-priv ResultColumn | Returns: The new top of the expression tree.The FROM list for the query this
expression is in, for binding columns. fromList, SubqueryList The subquery list being built as we find SubqueryNodes subqueryList, List<AggregateNode> The aggregate list being built as we find AggregateNodes aggregates)Overrides org. Bind this expression. |
| pack-priv void | bindResultColumnByName(TableDescriptor
The descriptor for the table being
updated or inserted into tableDescriptor, int The ordinal position of the column
in the table, starting at 1. (Used to
set the VirtualColumnId.) columnId)Bind this result column by its name and set the VirtualColumnId. |
| pack-priv void | bindResultColumnByPosition(TableDescriptor
The descriptor for the table being
inserted into tableDescriptor, int The ordinal position of the column
in the table, starting at 1. columnId)Bind this result column by ordinal position and set the VirtualColumnId. |
| pack-priv void | |
| pack-priv void | checkStorableExpression(ResultColumn toStore)
This verifies that the expression is storable into the result column. |
| private void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv ResultColumn | Returns: A new ResultColumn with the same contents as this oneMake a copy of this ResultColumn in a new ResultColumn |
| pack-priv void | collapseVirtualColumnIdGap(int
id of the column being removed. removedColumnId)Adjust this virtualColumnId to account for the removal of a column This routine is called when bind processing finds and removes duplicate columns in the result list which were pulled up due to their presence in the ORDER BY clause, but were later found to be duplicate. |
| pack-priv boolean | columnNameMatches(String columnName)
Return TRUE if this result column matches the provided column name. |
| pack-priv boolean | Returns: true means the column matches its expressions, false means it doesn't match.Check whether the column length and type of this result column match the expression under the columns. |
| pack-priv boolean | |
| public int | compareTo(ResultColumn
the object to be compared. other)Implements java. Compares this object with the specified object for order. |
| private DataValueDescriptor | |
| pack-priv void | generateExpression(ExpressionClassBuilder
The ExpressionClassBuilder for the class we're generating ecb, MethodBuilder The method the expression will go into mb)Overrides org. Do code generation for a result column. |
| pack-priv BaseColumnNode | Returns: a BaseColumnNode, or null if a BaseColumnNode cannot be foundGet the source BaseColumnNode for this result column. |
| pack-priv ColumnDescriptor | |
| public int | getColumnPosition()
Implements org. Get the position of the Column. |
| pack-priv ValueNode | |
| pack-priv JoinNode | getJoinResultSet()
Returns a non-null value if the ResultColumn represents the join column which is part of the SELECT list of a RIGHT OUTER JOIN with USING/NATURAL. |
| pack-priv int | |
| public String | getName()
Implements org. The following methods implement the ResultColumnDescriptor interface. |
| protected int | Returns: The variant type for the underlying expression.Overrides org. Return the variant type for the underlying expression. |
| public ColumnReference | |
| public int | |
| pack-priv String | getSchemaName()
Overrides org. This returns the user-supplied schema name of the column. |
| pack-priv String | getSourceColumnName()
Returns the underlying source column name, if this ResultColumn is a simple direct reference to a table column, or NULL otherwise. |
| public String | getSourceSchemaName()
Implements org. Get the name of the schema for the Column's base table, if any. |
| public String | getSourceTableName()
Implements org. Get the name of the underlying(base) table this column comes from, if any. |
| pack-priv ColumnDescriptor | getTableColumnDescriptor()
If this ResultColumn is bound to a column in a table get the column descriptor for the column in the table. |
| pack-priv String | getTableName()
Overrides org. This returns the user-supplied table name of the column. |
| public TableName | |
| pack-priv int | Returns: The number of the table to which this ResultColumn points, or -1 if we can't determine that from where we are.Search the tree beneath this ResultColumn until we find the number of the table to which this RC points, and return that table number. |
| public DataTypeDescriptor | getType()
Implements org. Returns a DataTypeDescriptor for the column. |
| public DataTypeDescriptor | getTypeServices()
Overrides org. Get the DataTypeServices from this ValueNode. |
| pack-priv String | |
| pack-priv int | Returns: virtualColumnId for this ResultColumnGet the virtualColumnId for this ResultColumn |
| pack-priv void | guaranteeColumnName()
Generate a unique (across the entire statement) column name for unnamed ResultColumns |
| public boolean | hasGenerationClause()
Implements org. Return true if this result column represents a generated column. |
| public boolean | isAutoincrement()
Implements org. Tell us if the column is an autoincrement column or not. |
| pack-priv boolean | isAutoincrementGenerated()
Returns true if this result column is a placeholder for a generated autoincrement value. |
| pack-priv boolean | isDefaultColumn()
Returns TRUE if the ResultColumn is standing in for a DEFAULT keyword in an insert/update statement. |
| pack-priv boolean | isEquivalent(ValueNode
the node to compare this ValueNode against. o)Implements abstract org. Tests if this node is equivalent to the specified ValueNode. |
| pack-priv boolean | Returns: Boolean - whether or not this column is a generated column.Is this a generated column? |
| pack-priv boolean | Returns: Boolean - whether or not this columm was generated for an unmatched column in an insert.Is this columm generated for an unmatched column in an insert? |
| public boolean | |
| pack-priv boolean | |
| pack-priv boolean | Returns: Boolean - whether or not this RC is redundant.Is this a redundant ResultColumn? |
| pack-priv boolean | Returns: Boolean - whether or not this column is a referenced column.Is this a referenced column? |
| pack-priv boolean | isRightOuterJoinUsingClause()
Returns TRUE if the ResultColumn is join column for a RIGHT OUTER JOIN with USING/NATURAL. |
| pack-priv boolean | Returns: true if this result column is updatable.Returns true if this column is updatable. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | markGeneratedForUnmatchedColumnInInsert()
Mark this a columm as generated for an unmatched column in an insert |
| pack-priv void | markUpdatableByCursor()
Mark this column as being updatable, so we can make sure it is in the "for update" list of a positioned update. |
| pack-priv void | |
| pack-priv ResultColumn | Returns: The modified expressionNumber of tables in the DML Statement numTables, FromList FromList from outer query block outerFromList, SubqueryList SubqueryList from outer query block outerSubqueryList, PredicateList PredicateList from outer query block outerPredicateList)Overrides org. Preprocess an expression tree. |
| pack-priv void | printSubNodes(int
The depth of this node in the tree depth)Overrides org. Prints the sub-nodes of this object. |
| pack-priv void | pullVirtualIsReferenced()
Mark this column as a referenced column if it is already marked as referenced or if any result column in its chain of virtual columns is marked as referenced. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | setColumnDescriptor(TableDescriptor
The TableDescriptor for the table
being updated or inserted into.
This parameter is used only for
error reporting. tableDescriptor, ColumnDescriptor The ColumnDescriptor to set in
this ResultColumn. columnDescriptor)Set the column descriptor for this result column. |
| pack-priv void | |
| pack-priv void | setExpression(ValueNode
The expression to be set in this ResultColumn expression)Set the expression in this ResultColumn. |
| pack-priv void | |
| pack-priv void | setJoinResultset(JoinNode
- The ResultColumn belongs to this JoinNode resultSet)This method gets called during the bind phase of a ResultColumn if it is determined that the ResultColumn represents the join column which is part of the SELECT list of a RIGHT OUTER JOIN with USING/NATURAL. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | setResultSetNumber(int
The resultSetNumber. resultSetNumber)Set the resultSetNumber for this ResultColumn. |
| pack-priv void | setRightOuterJoinUsingClause(boolean
True/False value)Will be set to TRUE if this ResultColumn is join column for a RIGHT OUTER JOIN with USING/NATURAL. |
| pack-priv void | |
| pack-priv void | |
| private void | |
| pack-priv void | |
| pack-priv void | setVirtualColumnId(int
The virtualColumnId for this ResultColumn id)Set the virtualColumnId for this ResultColumn |
| pack-priv void | |
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |
| pack-priv void | |
| public boolean | Returns: true means this column is updatableOverrides org. Implements org. Tell whether this column is updatable by a positioned update. |
| pack-priv boolean | Returns: true means this column is being updated.Tell whether this column is being updated. |
| pack-priv void | |
| pack-priv boolean | wasDefaultColumn()
Returns TRUE if the ResultColumn used to stand in for a DEFAULT keyword in an insert/update statement. |