| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private ValueNode | |
| private boolean | |
| private boolean | |
| private int | |
| private String | |
| private boolean | |
| private ValueNode | |
| private OrderByList | |
| public static final int | |
| private String | |
| private ArrayList | statsToUpdate
List of |
| pack-priv static final int | |
| private List | updatableColumns
There can only be a list of updatable columns when FOR UPDATE is specified as part of the cursor specification. |
| pack-priv static final int | |
| private int | |
| private FromTable |
| Access | Constructor and Description |
|---|---|
| pack-priv | CursorNode(String
Type of statement (SELECT, UPDATE, INSERT) statementType, ResultSetNode A ResultSetNode specifying the result set for
the cursor resultSet, String The name of the cursor, null if no name name, OrderByList The order by list for the cursor, null if no
order by list orderByList, ValueNode The value of a offset, ValueNode The value of a fetchFirst, boolean True if the offset/fetchFirst clauses come
from JDBC limit/offset escape syntax hasJDBClimitClause, int The user-specified update mode for the cursor,
for example, CursorNode.READ_ONLY updateMode, String[] The array of updatable columns specified by
the user in the FOR UPDATE clause, null if no
updatable columns specified. May only be
provided if the updateMode parameter is
CursorNode.UPDATE. updatableColumns, boolean True if this cursor is the driving left-join of a MERGE statement forMergeStatement, ContextManager The context manager cm)Constructor for a CursorNode |
| 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 int | Returns: either (NEED_CURSOR_ACTIVATIONOverrides org. Returns the type of activation this class generates. |
| public void | bindStatement()
Overrides org. Bind this CursorNode. |
| private void | bindUpdateColumns(FromTable
The underlying target table targetTable)Bind the update columns by their names to the target table of the cursor specification. |
| private void | collectTablesWithPossiblyStaleStats()
Collects table descriptors for base tables whose index statistics we want to check for staleness (or to create). |
| private int | Returns: the known update mode for the cursor.Take a cursor and determine if it is UPDATE or READ_ONLY based on the shape of the cursor specification. |
| pack-priv void | generate(ActivationClassBuilder
The ActivationClassBuilder for the class being built acb, MethodBuilder The method the generated code is to go into mb)Overrides org. Do code generation for this CursorNode |
| public Object | Returns: the cursor infoOverrides org. Get information about this cursor. |
| protected ArrayList | |
| pack-priv String | |
| pack-priv String | |
| pack-priv int | |
| pack-priv String | |
| pack-priv String | |
| public boolean | Returns: boolean Whether or not this Statement requires a set/clear savepointOverrides org. Returns whether or not this Statement requires a set/clear savepoint around its execution. |
| public void | optimizeStatement()
Overrides org. Optimize a DML statement (which is the only type of statement that should need optimizing, I think). |
| pack-priv void | printSubNodes(int
The depth of this node in the tree depth)Overrides org. Prints the sub-nodes of this object. |
| public boolean | Returns: true if references SESSION schema tables, else falseOverrides org. Return true if the node references SESSION schema tables (temporary or permanent) |
| pack-priv String | statementToString()
Implements abstract org.
|
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |
| public TableDescriptor[] | Returns: A list of table descriptors (potentially empty).Overrides org. Returns a list of base tables for which the index statistics of the associated indexes should be updated. |
| private static String | Returns: A String representing the update mode.An updateMode identifier updateMode)Support routine for translating an updateMode identifier to a String |
| checkIndexStats | back to summary |
|---|---|
| private boolean checkIndexStats | |
| fetchFirst | back to summary |
|---|---|
| private ValueNode fetchFirst | |
| forMergeStatement | back to summary |
|---|---|
| private boolean forMergeStatement | |
| hasJDBClimitClause | back to summary |
|---|---|
| private boolean hasJDBClimitClause | |
| indexOfSessionTableNamesInSavedObjects | back to summary |
|---|---|
| private int indexOfSessionTableNamesInSavedObjects | |
| name | back to summary |
|---|---|
| private String name | |
| needTarget | back to summary |
|---|---|
| private boolean needTarget | |
| offset | back to summary |
|---|---|
| private ValueNode offset | |
| orderByList | back to summary |
|---|---|
| private OrderByList orderByList | |
| READ_ONLY | back to summary |
|---|---|
| public static final int READ_ONLY | |
| statementType | back to summary |
|---|---|
| private String statementType | |
| statsToUpdate | back to summary |
|---|---|
| private ArrayList<TableDescriptor> statsToUpdate List of | |
| UNSPECIFIED | back to summary |
|---|---|
| pack-priv static final int UNSPECIFIED | |
| updatableColumns | back to summary |
|---|---|
| private List<String> updatableColumns There can only be a list of updatable columns when FOR UPDATE is specified as part of the cursor specification. | |
| UPDATE | back to summary |
|---|---|
| pack-priv static final int UPDATE | |
| updateMode | back to summary |
|---|---|
| private int updateMode | |
| updateTable | back to summary |
|---|---|
| private FromTable updateTable | |
| CursorNode | back to summary |
|---|---|
| pack-priv CursorNode(String statementType, ResultSetNode resultSet, String name, OrderByList orderByList, ValueNode offset, ValueNode fetchFirst, boolean hasJDBClimitClause, int updateMode, String[] updatableColumns, boolean forMergeStatement, ContextManager cm) Constructor for a CursorNode
| |
| acceptChildren | back to summary |
|---|---|
| pack-priv void acceptChildren(Visitor v) throws StandardException Overrides org. Accept the visitor for all visitable children of this node.
| |
| activationKind | back to summary |
|---|---|
| pack-priv int activationKind() Overrides org. Returns the type of activation this class generates.
| |
| bindStatement | back to summary |
|---|---|
| public void bindStatement() throws StandardException Overrides org. Bind this CursorNode. This means looking up tables and columns and getting their types, and figuring out the result types of all expressions, as well as doing view resolution, permissions checking, etc. It also includes determining whether an UNSPECIFIED cursor is updatable or not, and verifying that an UPDATE cursor actually is.
| |
| bindUpdateColumns | back to summary |
|---|---|
| private void bindUpdateColumns(FromTable targetTable) throws StandardException Bind the update columns by their names to the target table of the cursor specification. Doesn't check for duplicates in the list, although it could... Revisit If the list is empty, should it expand it out? at present, it leaves it empty.
| |
| collectTablesWithPossiblyStaleStats | back to summary |
|---|---|
| private void collectTablesWithPossiblyStaleStats() throws StandardException Collects table descriptors for base tables whose index statistics we want to check for staleness (or to create). | |
| determineUpdateMode | back to summary |
|---|---|
| private int determineUpdateMode(DataDictionary dataDictionary) throws StandardException Take a cursor and determine if it is UPDATE or READ_ONLY based on the shape of the cursor specification. The following conditions make a cursor read only:
| |
| generate | back to summary |
|---|---|
| pack-priv void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException Overrides org. Do code generation for this CursorNode
| |
| getCursorInfo | back to summary |
|---|---|
| public Object getCursorInfo() throws StandardException Overrides org. Get information about this cursor. For sps, this is info saved off of the original query tree (the one for the underlying query).
| |
| getSessionSchemaTableNamesForCursor | back to summary |
|---|---|
| protected ArrayList | |
| getUpdateBaseTableName | back to summary |
|---|---|
| pack-priv String getUpdateBaseTableName() | |
| getUpdateExposedTableName | back to summary |
|---|---|
| pack-priv String getUpdateExposedTableName() throws StandardException | |
| getUpdateMode | back to summary |
|---|---|
| pack-priv int getUpdateMode() | |
| getUpdateSchemaName | back to summary |
|---|---|
| pack-priv String getUpdateSchemaName() throws StandardException | |
| getXML | back to summary |
|---|---|
| pack-priv String getXML() | |
| needsSavepoint | back to summary |
|---|---|
| public boolean needsSavepoint() Overrides org. Returns whether or not this Statement requires a set/clear savepoint around its execution. The following statement "types" do not require them: Cursor - unnecessary and won't work in a read only environment Xact - savepoint will get blown away underneath us during commit/rollback
| |
| optimizeStatement | back to summary |
|---|---|
| public void optimizeStatement() throws StandardException Overrides org. Optimize a DML statement (which is the only type of statement that should need optimizing, I think). This method over-rides the one in QueryTreeNode. This method takes a bound tree, and returns an optimized tree. It annotates the bound tree rather than creating an entirely new tree. Throws an exception if the tree is not bound, or if the binding is out of date.
| |
| 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.
| |
| referencesSessionSchema | back to summary |
|---|---|
| public boolean referencesSessionSchema() throws StandardException Overrides org. Return true if the node references SESSION schema tables (temporary or permanent)
| |
| statementToString | back to summary |
|---|---|
| pack-priv String statementToString() Implements abstract org. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing. | |
| updateIndexStatisticsFor | back to summary |
|---|---|
| public TableDescriptor[] updateIndexStatisticsFor() throws StandardException Overrides org. Returns a list of base tables for which the index statistics of the associated indexes should be updated.
| |
| updateModeString | back to summary |
|---|---|
| private static String updateModeString(int updateMode) Support routine for translating an updateMode identifier to a String
| |