| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| private boolean | |
| private ResultColumn | |
| private ResultSetNode |
| Access | Constructor and Description |
|---|---|
| pack-priv | VirtualColumnNode(ResultSetNode
The ResultSetNode where the value is originating sourceResultSet, ResultColumn The ResultColumn where the value is originating sourceColumn, int The columnId within the current Row columnId, ContextManager The context manager cm)Constructor for a VirtualColumnNode. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | generateExpression(ExpressionClassBuilder
The ExpressionClassBuilder for the class being built acb, MethodBuilder The method the expression will go into mb)Overrides org. ColumnNode's are against the current row in the system. |
| pack-priv boolean | Returns: Whether or not this VCN is a correlated reference.Return whether or not this VCN is a correlated reference. |
| protected int | Returns: The variant type for the underlying expression.Overrides org. Return the variant type for the underlying expression. |
| pack-priv String | Returns: A String containing the name of the schema for the Column's table. If the column is not in a schema (i.e. derived column), it returns NULL.Overrides org. Get the name of the schema the ResultColumn's table is in, if any. |
| pack-priv ResultColumn | Returns: ResultSetNodeReturn the ResultColumn that is the source of this VirtualColumnNode. |
| pack-priv ResultColumn | Returns: ResultSetNodeOverrides org. Return the ResultColumn that is the source of this VirtualColumnNode. |
| pack-priv ResultSetNode | Returns: ResultSetNodeReturn the ResultSetNode that is the source of this VirtualColumnNode. |
| pack-priv String | Returns: A String containing the name of the table the Column is in. If the column is not in a table (i.e. is a derived column), it returns NULL.Overrides org. Get the name of the table the ResultColumn is in, if any. |
| public final DataTypeDescriptor | Returns: The DataTypeServices from this Node. This may be null if the node isn't bound yet.Overrides org. Get the DataTypeServices from this Node. |
| pack-priv boolean | Returns: boolean Whether or not this expression tree is cloneable.Overrides org. Return whether or not this expression tree is cloneable. |
| 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 void | printSubNodes(int
The depth of this node in the tree depth)Overrides org. Prints the sub-nodes of this object. |
| pack-priv void | |
| public final void | setType(DataTypeDescriptor
The DataTypeServices to set in this
ValueNode dtd)Overrides org. Set the DataTypeServices for this ValueNode. |
| public boolean | Returns: TRUE, if the column is a base column of a table and is writable by a positioned update.Overrides org. Return whether or not the ResultColumn is wirtable by a positioned update. |
| columnId | back to summary |
|---|---|
| pack-priv int columnId | |
| correlated | back to summary |
|---|---|
| private boolean correlated | |
| sourceColumn | back to summary |
|---|---|
| private ResultColumn sourceColumn | |
| sourceResultSet | back to summary |
|---|---|
| private ResultSetNode sourceResultSet | |
| VirtualColumnNode | back to summary |
|---|---|
| pack-priv VirtualColumnNode(ResultSetNode sourceResultSet, ResultColumn sourceColumn, int columnId, ContextManager cm) throws StandardException Constructor for a VirtualColumnNode.
| |
| generateExpression | back to summary |
|---|---|
| pack-priv void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException Overrides org. ColumnNode's are against the current row in the system. This lets us generate a faster get that simply returns the column from the current row, rather than getting the value out and returning that, only to have the caller (in the situations needed) stuffing it back into a new column holder object. We will assume the general generate() path is for getting the value out, and use generateColumn() when we want to keep the column wrapped.
| |
| getCorrelated | back to summary |
|---|---|
| pack-priv boolean getCorrelated() Return whether or not this VCN is a correlated reference.
| |
| getOrderableVariantType | back to summary |
|---|---|
| protected int getOrderableVariantType() throws StandardException Overrides org. Return the variant type for the underlying expression. The variant type can be: VARIANT - variant within a scan (method calls and non-static field access) SCAN_INVARIANT - invariant within a scan (column references from outer tables) QUERY_INVARIANT - invariant within the life of a query (constant expressions)
| |
| getSchemaName | back to summary |
|---|---|
| pack-priv String getSchemaName() throws StandardException Overrides org. Get the name of the schema the ResultColumn's table is in, if any. The return value will be null if the user did not supply a schema name (for example, select t.a from t). Another example for null return value (for example, select b.a from t as b). But for following query select app.t.a from t, this will return APP | |
| getSourceColumn | back to summary |
|---|---|
| pack-priv ResultColumn getSourceColumn() Return the ResultColumn that is the source of this VirtualColumnNode.
| |
| getSourceResultColumn | back to summary |
|---|---|
| pack-priv ResultColumn getSourceResultColumn() Overrides org. Return the ResultColumn that is the source of this VirtualColumnNode.
| |
| getSourceResultSet | back to summary |
|---|---|
| pack-priv ResultSetNode getSourceResultSet() Return the ResultSetNode that is the source of this VirtualColumnNode.
| |
| getTableName | back to summary |
|---|---|
| pack-priv String getTableName() Overrides org. Get the name of the table the ResultColumn is in, if any. This will be null if the user did not supply a name (for example, select a from t). The method will return B for this example, select b.a from t as b The method will return T for this example, select t.a from t | |
| getTypeServices | back to summary |
|---|---|
| public final DataTypeDescriptor getTypeServices() Overrides org. Get the DataTypeServices from this Node.
| |
| isCloneable | back to summary |
|---|---|
| pack-priv boolean isCloneable() Overrides org. Return whether or not this expression tree is cloneable.
| |
| isEquivalent | back to summary |
|---|---|
| pack-priv boolean isEquivalent(ValueNode o) throws StandardException Implements abstract org. Doc from org. Tests if this node is equivalent to the specified ValueNode. Two ValueNodes are considered equivalent if they will evaluate to the same value during query execution. This method provides basic expression matching facility for the derived class of ValueNode and it is used by the language layer to compare the node structural form of the two expressions for equivalence at bind phase. Note that it is not comparing the actual row values at runtime to produce a result; hence, when comparing SQL NULLs, they are considered to be equivalent and not unknown. One usage case of this method in this context is to compare the select column expression against the group by expression to check if they are equivalent. e.g.: SELECT c1+c2 FROM t1 GROUP BY c1+c2 In general, node equivalence is determined by the derived class of ValueNode. But they generally abide to the rules below:
| |
| printSubNodes | back to summary |
|---|---|
| pack-priv void printSubNodes(int depth) Overrides org. Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.
| |
| setCorrelated | back to summary |
|---|---|
| pack-priv void setCorrelated() Mark this VCN as a reference to a correlated column. (It's source resultSet is an outer ResultSet. | |
| setType | back to summary |
|---|---|
| public final void setType(DataTypeDescriptor dtd) throws StandardException Overrides org. Doc from org. Set the DataTypeServices for this ValueNode. This method is overridden in ParameterNode.
| |
| updatableByCursor | back to summary |
|---|---|
| public boolean updatableByCursor() Overrides org. Return whether or not the ResultColumn is wirtable by a positioned update.
| |