Java Doc for ResultColumnList.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » sql » compile » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.impl.sql.compile 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.sql.compile.QueryTreeNode
      org.apache.derby.impl.sql.compile.QueryTreeNodeVector
         org.apache.derby.impl.sql.compile.ResultColumnList

ResultColumnList
public class ResultColumnList extends QueryTreeNodeVector (Code)
A ResultColumnList is the target list of a SELECT, INSERT, or UPDATE.
See Also:   ResultColumn


Field Summary
protected  longconglomerateId
    
protected  booleanforUpdate
    
protected  booleanindexRow
    
 intorderBySelect
    

Constructor Summary
public  ResultColumnList()
    

Method Summary
public  voidaddRCForRID()
     Add an RC to the end of the list for the RID from an index. NOTE: RC.expression is a CurrentRowLocationNode.
public  voidaddResultColumn(ResultColumn resultColumn)
    
public  voidadjustVirtualColumnIds(int adjust)
     Walk the list and adjust the virtualColumnIds in the ResultColumns by the specified amount.
 booleanallExpressionsAreColumns(ResultSetNode sourceRS)
     Determine if all of the RC.expressions are columns in the source result set. This is useful for determining if we need to do reflection at execution time.
Parameters:
  sourceRS - The source ResultSet.
 intallTopCRsFromSameTable()
     Return whether or not all of the RCs in the list whose expressions are ColumnReferences are from the same table.
public  voidappendResultColumns(ResultColumnList resultColumns, boolean destructiveCopy)
     Append a given ResultColumnList to this one, resetting the virtual column ids in the appended portion.
public  voidbindExpressions(FromList fromList, SubqueryList subqueryList, Vector aggregateVector)
     Bind the expressions in this ResultColumnList.
public  voidbindResultColumnsByName(TableDescriptor targetTableDescriptor)
     Bind the result columns by their names.
public  FormatableBitSetbindResultColumnsByName(TableDescriptor targetTableDescriptor, DMLStatementNode statement)
     Bind the result columns by their names.
public  voidbindResultColumnsByName(ResultColumnList fullRCL, FromVTI targetVTI, DMLStatementNode statement)
     Bind the result columns by their names.
public  voidbindResultColumnsByPosition(TableDescriptor targetTableDescriptor)
     Bind the result columns by ordinal position.
public  voidbindResultColumnsToExpressions()
     Bind the result columns to the expressions that live under them. All this does is copy the datatype information to from each expression to each result column.
public  voidbindUntypedNullsToResultColumns(ResultColumnList bindingRCL)
     Bind any untyped null nodes to the types in the given ResultColumnList. Nodes that don't know their type may pass down nulls to children nodes.
public  ExecRowbuildEmptyIndexRow(TableDescriptor td, ConglomerateDescriptor cd, StoreCostController scc, DataDictionary dd)
     Build an empty index row for the given conglomerate.
public  ExecRowbuildEmptyRow()
     Build an empty row with the size and shape of the ResultColumnList.
public  voidcheckAutoincrement(ResultColumnList sourceRSRCL)
     check if any autoincrement columns exist in the result column list.
public  voidcheckAutoincrementUnion(ResultSetNode rs)
     If the resultset is a UnionNode (e.g., multi-rows in VALUES clause), we recursively call itself.
public  voidcheckColumnUpdateability(String[] ucl, String cursorName)
     Verify that all of the columns in the SET clause of a positioned update appear in the cursor's FOR UPDATE OF list.
Parameters:
  ucl - The cursor's FOR UPDATE OF list.
 voidcheckForInvalidDefaults()
     Walk the RCL and check for DEFAULTs.
 voidcheckStorableExpressions(ResultColumnList toStore)
     Verify that all the result columns have expressions that are storable for them.
 voidcheckStorableExpressions()
     Verify that all the result columns have expressions that are storable for them.
public  voidclearColumnReferences()
     Clear the column references from the RCL.
public  voidclearTableNames()
    
 booleancolumnTypesAndLengthsMatch()
    
 booleancolumnTypesAndLengthsMatch(ResultColumnList otherRCL)
    
 ResultColumnListcompactColumns(boolean positionedUpdate, boolean always)
     Create a new, compacted RCL based on the referenced RCs in this list.
public  booleancontainsAllResultColumn()
     Return whether or not this RCL contains an AllResultColumn.
public  voidcopyColumnsToNewList(ResultColumnList targetList, FormatableBitSet copyList)
     Copy the RCs from this list to the supplied target list.
public  ResultColumnListcopyListAndObjects()
     Create a shallow copy of a ResultColumnList and its ResultColumns.
public  voidcopyOrderBySelect(ResultColumnList src)
    
public  voidcopyReferencedColumnsToNewList(ResultColumnList targetList)
     Copy the referenced RCs from this list to the supplied target list.
 voidcopyResultColumnNames(ResultColumnList nameList)
     Copy the result column names from the given ResultColumnList to this ResultColumnList.
public  voidcopyTypesAndLengthsToSource(ResultColumnList sourceRCL)
     Copy the types and lengths for this RCL (the target) to another RCL (the source).
public  intcountNumberOfSimpleColumnReferences()
     Count the number of RCs with simple ColumnReferences.
public  intcountReferencedColumns()
     Count the number of RCs in the list that are referenced.
public  voidcreateListFromResultSetMetaData(ResultSetMetaData rsmd, TableName tableName, String javaClassName)
     Generate an RCL to match the contents of a ResultSetMetaData.
public  voiddecOrderBySelect()
    
public  voiddisablePrivilegeCollection()
    
public  voiddoProjection()
     Project out any unreferenced ResultColumns from the list and reset the virtual column ids in the referenced ResultColumns.
public  voidexpandAllsAndNameColumns(FromList fromList)
     Expand any *'s in the ResultColumnList.
public  ResultColumnListexpandToAll(TableDescriptor td, TableName tableName)
     Expand this ResultColumnList by adding all columns from the given table that are not in this list.
public  voidexportNames(String[] columnNames)
     Export the result column names to the passed in String[].
public  ResultColumnfindParentResultColumn(ResultColumn childRC)
     Given a ResultColumn at the next deepest level in the tree, search this RCL for its parent ResultColumn.
public  voidgenVirtualColumnNodes(ResultSetNode sourceResultSet, ResultColumnList sourceResultColumnList)
     Walk the list and replace ResultColumn.expression with a new VirtualColumnNode.
public  voidgenVirtualColumnNodes(ResultSetNode sourceResultSet, ResultColumnList sourceResultColumnList, boolean markReferenced)
     Walk the list and replace ResultColumn.expression with a new VirtualColumnNode.
public  voidgenerate(ActivationClassBuilder acb, MethodBuilder mb)
     Generate the code to place the columns' values into a row variable named "r".
 voidgenerateCore(ExpressionClassBuilder acb, MethodBuilder mb, boolean genNulls)
     Generate the code to place the columns' values into a row variable named "r".
 voidgenerateHolder(ExpressionClassBuilder acb, MethodBuilder mb)
     Generates a row with the size and shape of the ResultColumnList. Some structures, like FromBaseTable and DistinctNode, need to generate rowAllocator functions to get a row the size and shape of their ResultColumnList.
 voidgenerateHolder(ExpressionClassBuilder acb, MethodBuilder mb, FormatableBitSet referencedCols, FormatableBitSet propagatedCols)
     Generates a row with the size and shape of the ResultColumnList. Some structures, like FromBaseTable and DistinctNode, need to generate rowAllocator functions to get a row the size and shape of their ResultColumnList.
 MethodBuildergenerateHolderMethod(ExpressionClassBuilder acb, FormatableBitSet referencedCols, FormatableBitSet propagatedCols)
    
 voidgenerateNulls(ActivationClassBuilder acb, MethodBuilder mb)
     Generate the code to place the columns' values into a row variable named "r".
public  ResultColumngetAtMostOneResultColumn(ColumnReference cr, String exposedTableName)
     Get a ResultColumn that matches the specified columnName and mark the ResultColumn as being referenced.
public  String[]getColumnNames()
     Get an array of strings for all the columns in this RCL.
public  int[]getColumnPositions(TableDescriptor td)
     Get an array of column positions (1-based) for all the columns in this RCL.
public  FormatableBitSetgetColumnReferenceMap()
    
protected  booleangetCountMismatchAllowed()
     Return whether or not a count mismatch is allowed between this RCL, as a derived column list, and an underlying RCL.
 ResultColumnListgetJoinColumns(ResultColumnList joinColumns)
     Get the join columns from this list. This is useful for a join with a USING clause.
public  ResultColumngetOrderByColumn(int position)
     Get a ResultColumn from a column position (1-based) in the list, null if out of range (for order by).
public  ResultColumngetOrderByColumn(String columnName, TableName tableName, int tableNumber)
     For order by, get a ResultColumn that matches the specified columnName.
public  ResultColumngetOrderByColumn(String columnName, TableName tableName)
     For order by, get a ResultColumn that matches the specified columnName.
public  intgetOrderBySelect()
    
 FormatableBitSetgetReferencedFormatableBitSet(boolean positionedUpdate, boolean always, boolean onlyBCNs)
     Generate a FormatableBitSet representing the columns that are referenced in this RCL. The caller decides if they want this FormatableBitSet if every RC is referenced.
Parameters:
  positionedUpdate - Whether or not the scan that the RCL belongs to is for update w/o a column list
Parameters:
  always - Whether or not caller always wants a non-null FormatableBitSet ifall RCs are referenced.
Parameters:
  onlyBCNs - If true, only set bit if expression is a BaseColumnNode,otherwise set bit for all referenced RCs.
public  ResultColumngetResultColumn(int position)
    
public  ResultColumngetResultColumn(int colNum, ResultSetNode rsn, int[] whichRC)
     Take a column position and a ResultSetNode and find the ResultColumn in this RCL whose source result set is the same as the received RSN and whose column position is the same as the received column position.
Parameters:
  colNum - The column position (w.r.t rsn) for which we're searching
Parameters:
  rsn - The result set node for which we're searching.
public  ResultColumngetResultColumn(String columnName)
     Get a ResultColumn that matches the specified columnName and mark the ResultColumn as being referenced.
public  ResultColumngetResultColumn(String columnsTableName, String columnName)
     Get a ResultColumn that matches the specified columnName and mark the ResultColumn as being referenced.
 ResultColumn[]getSortedByPosition()
     Return an array that contains references to the columns in this list sorted by position.
public  int[]getStreamStorableColIds(int heapColCount)
     Return an array holding the 0 based heap offsets of the StreamStorable columns in this ResultColumnList. This returns null if this list does not contain any StreamStorableColumns.
public  intgetTotalColumnSize()
     Get the size of all the columns added together.
public  booleanhasConsistentTypeInfo()
     Verify that all ResultColumns and their expressions have type information and that the type information between the respective RCs and expressions matches.
public  voidincOrderBySelect()
    
public  booleanisCloneable()
     Return whether or not this RCL can be flattened out of a tree.
public  booleanisExactTypeAndLengthMatch(ResultColumnList otherRCL)
     Do the 2 RCLs have the same type & length. This is useful for UNIONs when deciding whether a NormalizeResultSet is required.
Parameters:
  otherRCL - The other RCL.
public  ResultColumnDescriptor[]makeResultDescriptors()
     Make a ResultDescription for use in a ResultSet.
 ResultColumnDescriptor[]makeResultDescriptors(ExecutionContext ec)
    
 int[]mapSourceColumns()
     Map the source columns to these columns.
public  voidmarkAllUnreferenced()
     Walk the list and mark all RCs as unreferenced.
 voidmarkColumnsInSelectListUpdatableByCursor(Vector updateColumns)
     Mark all the columns in the select sql that this result column list represents as updatable if they match the columns in the given update column list.
protected  voidmarkInitialSize()
    
 voidmarkUpdatableByCursor()
     Mark all the (base) columns in this list as updatable by a positioned update statement.
 voidmarkUpdatableByCursor(Vector updateColumns)
    
 voidmarkUpdated()
     Mark all the columns in this list as updated by an update statement.
 voidmarkUpdated(ResultColumnList updateColumns)
     Mark as updatable all the columns in this result column list that match the columns in the given update column list.
public  voidnameAllResultColumns()
     Generate (unique across the entire statement) column names for those ResultColumns in this list which are not named.
public  booleannopProjection(ResultColumnList childRCL)
     Determine whether this RCL is a No-Op projection of the given RCL.
public  voidpopulate(TableDescriptor table, int[] columnIDs)
     Build this ResultColumnList from a table description and an array of column IDs.
public  voidpreprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList)
     Preprocess the expression trees under the RCL.
public  voidpropagateDCLInfo(ResultColumnList derivedRCL, String tableName)
     Validate the derived column list (DCL) and propagate the info from the list to the final ResultColumnList.
 voidpullVirtualIsReferenced()
     Or in any isReferenced booleans from the virtual column chain.
public  voidrecordColumnReferences(int[] idArray, int basis)
     Record the column ids of the referenced columns in the specified array.
public  voidrecordColumnReferences(boolean[] colArray1, JBitSet[] tableColMap, int tableNumber)
     Record the top level ColumnReferences in the specified array and table map This is useful when checking for uniqueness conditions.
 voidrejectParameters()
     Look for and reject ? parameters under ResultColumns.
 voidrejectXMLValues()
     Check for (and reject) XML values directly under the ResultColumns. This is done for SELECT/VALUES statements.
public  voidremapColumnReferencesToExpressions()
     Remap all ColumnReferences in this tree to be clones of the underlying expression.
 voidremoveJoinColumns(ResultColumnList joinColumns)
     Remove the columns which are join columns (in the joinColumns RCL) from this list.
 voidreplaceDefaults(TableDescriptor ttd, ResultColumnList tcl)
     Replace any DEFAULTs with the associated tree for the default.
 voidresetVirtualColumnIds()
     Reset the virtual column ids for all of the underlying RCs.
 booleanreusableResult()
     Return whether or not the same result row can be used for all rows returned by the associated ResultSet.
public  voidsetClause(int clause)
    
protected  voidsetCountMismatchAllowed(boolean allowed)
     Set the value of whether or not a count mismatch is allowed between this RCL, as a derived column list, and an underlying RCL.
 voidsetIndexRow(long cid, boolean forUpdate)
    
public  voidsetNullability(boolean nullability)
    
public  voidsetRedundant()
     Mark all of the ResultColumns as redundant.
public  voidsetResultSetNumber(int resultSetNumber)
     Set the resultSetNumber in all of the ResultColumns.
public  voidsetUnionResultExpression(ResultColumnList otherRCL, int tableNumber, int level, String operatorName)
     Set up the result expressions for a UNION, INTERSECT, or EXCEPT: o Verify union type compatiblity o Get dominant type for result (type + max length + nullability) o Create a new ColumnReference with dominant type and name of from this RCL and make that the new expression.
public  int[]sortMe()
     Return an array of all my column positions, sorted in ascending order.
public  voidtreePrint(int depth)
     This class needs a treePrint method, even though it is not a descendant of QueryTreeNode, because its members contain tree nodes, and these have to be printed and indented properly.
 booleanupdatableByCursor(int columnPosition)
     Returns true if the given column position is for a column that will be or could be updated by the positioned update of a cursor.
public  booleanupdateOverlaps(int[] columns)
     Does the column list contain any of the given column positions that are updated? Implements same named routine in UpdateList.
 voidverifyAllOrderable()
     Verify that all of the RCs in this list are comparable.
public  StringverifyCreateConstraintColumnList(TableElementList tel)
     Verify that all of the column names in this list are contained within the ColumnDefinitionNodes within the TableElementList.
public  StringverifyUniqueNames(boolean errForGenCols)
     Check the uniqueness of the column names within a column list.
Parameters:
  errForGenCols - Raise an error for any generated column names.

Field Detail
conglomerateId
protected long conglomerateId(Code)



forUpdate
protected boolean forUpdate(Code)



indexRow
protected boolean indexRow(Code)



orderBySelect
int orderBySelect(Code)




Constructor Detail
ResultColumnList
public ResultColumnList()(Code)




Method Detail
addRCForRID
public void addRCForRID() throws StandardException(Code)
Add an RC to the end of the list for the RID from an index. NOTE: RC.expression is a CurrentRowLocationNode. This was previously only used for non-select DML. We test for this node when generating the holder above and generate the expected code. (We really should create yet another new node type with its own code generation.)
exception:
  StandardException - Thrown on error



addResultColumn
public void addResultColumn(ResultColumn resultColumn)(Code)
Add a ResultColumn (at this point, ResultColumn or AllResultColumn) to the list
Parameters:
  resultColumn - The ResultColumn to add to the list



adjustVirtualColumnIds
public void adjustVirtualColumnIds(int adjust)(Code)
Walk the list and adjust the virtualColumnIds in the ResultColumns by the specified amount. If ResultColumn.expression is a VirtualColumnNode, then we adjust the columnId there as well.
Parameters:
  adjust - The size of the increment.



allExpressionsAreColumns
boolean allExpressionsAreColumns(ResultSetNode sourceRS)(Code)
Determine if all of the RC.expressions are columns in the source result set. This is useful for determining if we need to do reflection at execution time.
Parameters:
  sourceRS - The source ResultSet. Whether or not all of the RC.expressions are columns in the source result set.



allTopCRsFromSameTable
int allTopCRsFromSameTable()(Code)
Return whether or not all of the RCs in the list whose expressions are ColumnReferences are from the same table. One place this is useful for distinct elimination based on the existence of a uniqueness condition. -1 if all of the top level CRs in the RCLare not ColumnReferences from the same table,else the tableNumber



appendResultColumns
public void appendResultColumns(ResultColumnList resultColumns, boolean destructiveCopy)(Code)
Append a given ResultColumnList to this one, resetting the virtual column ids in the appended portion.
Parameters:
  resultColumns - The ResultColumnList to be appended
Parameters:
  destructiveCopy - Whether or not this is a descructive copyfrom resultColumns



bindExpressions
public void bindExpressions(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException(Code)
Bind the expressions in this ResultColumnList. This means binding the expression under each ResultColumn node.
Parameters:
  fromList - The FROM list for the query thisexpression is in, for binding columns.
Parameters:
  subqueryList - The subquery list being built as we find SubqueryNodes
Parameters:
  aggregateVector - The aggregate vector being built as we find AggregateNodes
exception:
  StandardException - Thrown on error



bindResultColumnsByName
public void bindResultColumnsByName(TableDescriptor targetTableDescriptor) throws StandardException(Code)
Bind the result columns by their names. This is useful for GRANT and REVOKE statements like "GRANT SELECT ON t(c1,c1,c3) TO george", where the user specified a column list. This method does not check for duplicate column names.
Parameters:
  targetTableDescriptor - The descriptor for the table
exception:
  StandardException - Thrown on error



bindResultColumnsByName
public FormatableBitSet bindResultColumnsByName(TableDescriptor targetTableDescriptor, DMLStatementNode statement) throws StandardException(Code)
Bind the result columns by their names. This is useful for update, grant, and revoke statements, and for INSERT statements like "insert into t (a, b, c) values (1, 2, 3)" where the user specified a column list. If the statment is an insert or update verify that the result column list does not contain any duplicates. NOTE: We pass the ResultColumns position in the ResultColumnList so that the VirtualColumnId gets set.
Parameters:
  targetTableDescriptor - The descriptor for the table beingupdated or inserted into
Parameters:
  statement - DMLStatementNode containing this list, null if no duplicate checking is to be done A FormatableBitSet representing the set of columns with respect to the table
exception:
  StandardException - Thrown on error



bindResultColumnsByName
public void bindResultColumnsByName(ResultColumnList fullRCL, FromVTI targetVTI, DMLStatementNode statement) throws StandardException(Code)
Bind the result columns by their names. This is useful for update VTI statements, and for INSERT statements like "insert into new t() (a, b, c) values (1, 2, 3)" where the user specified a column list. Also, verify that the result column list does not contain any duplicates. NOTE: We pass the ResultColumns position in the ResultColumnList so that the VirtualColumnId gets set.
Parameters:
  fullRCL - The full RCL for the target table
Parameters:
  statement - DMLStatementNode containing this list
exception:
  StandardException - Thrown on error



bindResultColumnsByPosition
public void bindResultColumnsByPosition(TableDescriptor targetTableDescriptor) throws StandardException(Code)
Bind the result columns by ordinal position. This is useful for INSERT statements like "insert into t values (1, 2, 3)", where the user did not specify a column list.
Parameters:
  targetTableDescriptor - The descriptor for the table beinginserted into
exception:
  StandardException - Thrown on error



bindResultColumnsToExpressions
public void bindResultColumnsToExpressions() throws StandardException(Code)
Bind the result columns to the expressions that live under them. All this does is copy the datatype information to from each expression to each result column. This is useful for SELECT statements, where the result type of each column is the type of the column's expression.
exception:
  StandardException - Thrown on error



bindUntypedNullsToResultColumns
public void bindUntypedNullsToResultColumns(ResultColumnList bindingRCL) throws StandardException(Code)
Bind any untyped null nodes to the types in the given ResultColumnList. Nodes that don't know their type may pass down nulls to children nodes. In the case of something like a union, it knows to try its right and left result sets against each other. But if a null reaches us, it means we have a null type that we don't know how to handle.
Parameters:
  bindingRCL - The ResultColumnList with the types to bind to.
exception:
  StandardException - Thrown on error



buildEmptyIndexRow
public ExecRow buildEmptyIndexRow(TableDescriptor td, ConglomerateDescriptor cd, StoreCostController scc, DataDictionary dd) throws StandardException(Code)
Build an empty index row for the given conglomerate. an empty row of the correct size and shape.
exception:
  StandardException - Thrown on error



buildEmptyRow
public ExecRow buildEmptyRow() throws StandardException(Code)
Build an empty row with the size and shape of the ResultColumnList. an empty row of the correct size and shape.
exception:
  StandardException - Thrown on error



checkAutoincrement
public void checkAutoincrement(ResultColumnList sourceRSRCL) throws StandardException(Code)
check if any autoincrement columns exist in the result column list. called from insert or update where you cannot insert/update the value of an autoincrement column.
exception:
  StandardException - If the column is an ai column



checkAutoincrementUnion
public void checkAutoincrementUnion(ResultSetNode rs) throws StandardException(Code)
If the resultset is a UnionNode (e.g., multi-rows in VALUES clause), we recursively call itself. checkAutoincrement() will set ColumnDescriptor for autoincrement columns. This way, all ColumnDescriptor of all rows will be set properly.



checkColumnUpdateability
public void checkColumnUpdateability(String[] ucl, String cursorName) throws StandardException(Code)
Verify that all of the columns in the SET clause of a positioned update appear in the cursor's FOR UPDATE OF list.
Parameters:
  ucl - The cursor's FOR UPDATE OF list. (May be null.)
Parameters:
  cursorName - The cursor's name.
exception:
  StandardException - Thrown on error



checkForInvalidDefaults
void checkForInvalidDefaults() throws StandardException(Code)
Walk the RCL and check for DEFAULTs. DEFAULTs are invalid at the time that this method is called, so we throw an exception if found. NOTE: The grammar allows: VALUES DEFAULT;
exception:
  StandardException - Thrown on error



checkStorableExpressions
void checkStorableExpressions(ResultColumnList toStore) throws StandardException(Code)
Verify that all the result columns have expressions that are storable for them. Check versus the given ResultColumnList.
exception:
  StandardException - Thrown on error



checkStorableExpressions
void checkStorableExpressions() throws StandardException(Code)
Verify that all the result columns have expressions that are storable for them. Check versus the expressions under the ResultColumns.
exception:
  StandardException - Thrown on error



clearColumnReferences
public void clearColumnReferences()(Code)
Clear the column references from the RCL. (Restore RCL back to a state where none of the RCs are marked as referenced.)



clearTableNames
public void clearTableNames()(Code)



columnTypesAndLengthsMatch
boolean columnTypesAndLengthsMatch() throws StandardException(Code)



columnTypesAndLengthsMatch
boolean columnTypesAndLengthsMatch(ResultColumnList otherRCL) throws StandardException(Code)



compactColumns
ResultColumnList compactColumns(boolean positionedUpdate, boolean always) throws StandardException(Code)
Create a new, compacted RCL based on the referenced RCs in this list. If the RCL being compacted is for an updatable scan, then we simply return this. The caller tells us whether or not they want a new list if there is no compaction because all RCs are referenced. This is useful in the case where the caller needs a new RCL for existing RCs so that it can augment the new list.
Parameters:
  positionedUpdate - Whether or not the scan that the RCL belongs to is for update w/o a column list
Parameters:
  always - Whether or not caller always wants a new RCL The compacted RCL if compaction occurred, otherwise return this RCL.
exception:
  StandardException - Thrown on error



containsAllResultColumn
public boolean containsAllResultColumn()(Code)
Return whether or not this RCL contains an AllResultColumn. This is useful when dealing with SELECT * views which reference tables that may have had columns added to them via ALTER TABLE since the view was created. Whether or not this RCL contains an AllResultColumn.



copyColumnsToNewList
public void copyColumnsToNewList(ResultColumnList targetList, FormatableBitSet copyList)(Code)
Copy the RCs from this list to the supplied target list.
Parameters:
  targetList - The list to copy to,
Parameters:
  copyList - 1 based bitMap we copy columns associated with set bits.



copyListAndObjects
public ResultColumnList copyListAndObjects() throws StandardException(Code)
Create a shallow copy of a ResultColumnList and its ResultColumns. (All other pointers are preserved.) Useful for building new ResultSetNodes during preprocessing. None.
exception:
  StandardException - Thrown on error



copyOrderBySelect
public void copyOrderBySelect(ResultColumnList src)(Code)



copyReferencedColumnsToNewList
public void copyReferencedColumnsToNewList(ResultColumnList targetList)(Code)
Copy the referenced RCs from this list to the supplied target list.
Parameters:
  targetList - The list to copy to



copyResultColumnNames
void copyResultColumnNames(ResultColumnList nameList)(Code)
Copy the result column names from the given ResultColumnList to this ResultColumnList. This is useful for insert-select, where the columns being inserted into may be different from the columns being selected from. The result column list for an insert is supposed to have the column names being inserted into.
Parameters:
  nameList - The ResultColumnList from which to copythe column names



copyTypesAndLengthsToSource
public void copyTypesAndLengthsToSource(ResultColumnList sourceRCL) throws StandardException(Code)
Copy the types and lengths for this RCL (the target) to another RCL (the source). This is useful when adding a NormalizeResultSetNode.
Parameters:
  sourceRCL - The source RCL



countNumberOfSimpleColumnReferences
public int countNumberOfSimpleColumnReferences()(Code)
Count the number of RCs with simple ColumnReferences. (RC.expression instanceof ColumnReference) This is useful for ensuring that the number of columns in the group by list equals the number of grouping columns. int The number of simple ColumnReferences.



countReferencedColumns
public int countReferencedColumns()(Code)
Count the number of RCs in the list that are referenced. The number of RCs in the list that are referenced.



createListFromResultSetMetaData
public void createListFromResultSetMetaData(ResultSetMetaData rsmd, TableName tableName, String javaClassName) throws StandardException(Code)
Generate an RCL to match the contents of a ResultSetMetaData. This is useful when dealing with VTIs.
Parameters:
  rsmd - The ResultSetMetaData.
Parameters:
  tableName - The TableName for the BCNs.
Parameters:
  javaClassName - The name of the VTI
exception:
  StandardException - Thrown on error



decOrderBySelect
public void decOrderBySelect()(Code)



disablePrivilegeCollection
public void disablePrivilegeCollection()(Code)

See Also:   QueryTreeNode.disablePrivilegeCollection



doProjection
public void doProjection() throws StandardException(Code)
Project out any unreferenced ResultColumns from the list and reset the virtual column ids in the referenced ResultColumns. If all ResultColumns are projected out, then the list is not empty.
exception:
  StandardException - Thrown on error



expandAllsAndNameColumns
public void expandAllsAndNameColumns(FromList fromList) throws StandardException(Code)
Expand any *'s in the ResultColumnList. In addition, we will guarantee that each ResultColumn has a name. (All generated names will be unique across the entire statement.)
exception:
  StandardException - Thrown on error



expandToAll
public ResultColumnList expandToAll(TableDescriptor td, TableName tableName) throws StandardException(Code)
Expand this ResultColumnList by adding all columns from the given table that are not in this list. The result is sorted by column position.
Parameters:
  td - The TableDescriptor for the table in question
Parameters:
  tableName - The name of the table as given in the query A new ResultColumnList expanded to include all columns inthe given table.
exception:
  StandardException - Thrown on error



exportNames
public void exportNames(String[] columnNames)(Code)
Export the result column names to the passed in String[].
Parameters:
  columnNames - String[] to hold the column names.



findParentResultColumn
public ResultColumn findParentResultColumn(ResultColumn childRC)(Code)
Given a ResultColumn at the next deepest level in the tree, search this RCL for its parent ResultColumn.
Parameters:
  childRC - The child ResultColumn ResultColumn The parent ResultColumn



genVirtualColumnNodes
public void genVirtualColumnNodes(ResultSetNode sourceResultSet, ResultColumnList sourceResultColumnList) throws StandardException(Code)
Walk the list and replace ResultColumn.expression with a new VirtualColumnNode. This is useful when propagating a ResultColumnList up the query tree. NOTE: This flavor marks all of the underlying RCs as referenced.
Parameters:
  sourceResultSet - ResultSetNode that is source of value
exception:
  StandardException - Thrown on error



genVirtualColumnNodes
public void genVirtualColumnNodes(ResultSetNode sourceResultSet, ResultColumnList sourceResultColumnList, boolean markReferenced) throws StandardException(Code)
Walk the list and replace ResultColumn.expression with a new VirtualColumnNode. This is useful when propagating a ResultColumnList up the query tree.
Parameters:
  sourceResultSet - ResultSetNode that is source of value
Parameters:
  markReferenced - Whether or not to mark the underlying RCsas referenced
exception:
  StandardException - Thrown on error



generate
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)
Generate the code to place the columns' values into a row variable named "r". This wrapper is here rather than in ResultColumn, because that class does not know about the position of the columns in the list.
exception:
  StandardException - Thrown on error



generateCore
void generateCore(ExpressionClassBuilder acb, MethodBuilder mb, boolean genNulls) throws StandardException(Code)
Generate the code to place the columns' values into a row variable named "r". This wrapper is here rather than in ResultColumn, because that class does not know about the position of the columns in the list. This is the method that does the work.



generateHolder
void generateHolder(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)
Generates a row with the size and shape of the ResultColumnList. Some structures, like FromBaseTable and DistinctNode, need to generate rowAllocator functions to get a row the size and shape of their ResultColumnList. We return the method pointer, which is a field access in the generated class.
exception:
  StandardException -



generateHolder
void generateHolder(ExpressionClassBuilder acb, MethodBuilder mb, FormatableBitSet referencedCols, FormatableBitSet propagatedCols) throws StandardException(Code)
Generates a row with the size and shape of the ResultColumnList. Some structures, like FromBaseTable and DistinctNode, need to generate rowAllocator functions to get a row the size and shape of their ResultColumnList. We return the method pointer, which is a field access in the generated class.
exception:
  StandardException -



generateHolderMethod
MethodBuilder generateHolderMethod(ExpressionClassBuilder acb, FormatableBitSet referencedCols, FormatableBitSet propagatedCols) throws StandardException(Code)



generateNulls
void generateNulls(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)
Generate the code to place the columns' values into a row variable named "r". This wrapper is here rather than in ResultColumn, because that class does not know about the position of the columns in the list.
exception:
  StandardException - Thrown on error



getAtMostOneResultColumn
public ResultColumn getAtMostOneResultColumn(ColumnReference cr, String exposedTableName) throws StandardException(Code)
Get a ResultColumn that matches the specified columnName and mark the ResultColumn as being referenced. NOTE - this flavor enforces no ambiguity (at most 1 match) Only FromSubquery needs to call this flavor since it can have ambiguous references in its own list.
Parameters:
  cr - The ColumnReference to resolve
Parameters:
  exposedTableName - Exposed table name for FromTable the column that matches that name.
exception:
  StandardException - Thrown on error



getColumnNames
public String[] getColumnNames()(Code)
Get an array of strings for all the columns in this RCL. the array of strings



getColumnPositions
public int[] getColumnPositions(TableDescriptor td) throws StandardException(Code)
Get an array of column positions (1-based) for all the columns in this RCL. Assumes that all the columns are in the passed-in table the array of strings throws StandardException on error



getColumnReferenceMap
public FormatableBitSet getColumnReferenceMap()(Code)
Get a FormatableBitSet of the columns referenced in this rcl the FormatableBitSet



getCountMismatchAllowed
protected boolean getCountMismatchAllowed()(Code)
Return whether or not a count mismatch is allowed between this RCL, as a derived column list, and an underlying RCL. This is allowed for SELECT * views when an underlying table has had columns added to it via ALTER TABLE. return Whether or not a mismatch is allowed.



getJoinColumns
ResultColumnList getJoinColumns(ResultColumnList joinColumns)(Code)
Get the join columns from this list. This is useful for a join with a USING clause. (ANSI specifies that the join columns appear 1st.)
Parameters:
  joinColumns - A list of the join columns. A list of the join columns from this list



getOrderByColumn
public ResultColumn getOrderByColumn(int position)(Code)
Get a ResultColumn from a column position (1-based) in the list, null if out of range (for order by).
Parameters:
  position - The ResultColumn to get from the list (1-based) the column at that position, null if out of range



getOrderByColumn
public ResultColumn getOrderByColumn(String columnName, TableName tableName, int tableNumber) throws StandardException(Code)
For order by, get a ResultColumn that matches the specified columnName.
Parameters:
  columnName - The ResultColumn to get from the list
Parameters:
  tableName - The table name on the OrderByColumn, if any
Parameters:
  tableNumber - The tableNumber corresponding to the FromTable with theexposed name of tableName, if tableName != null. the column that matches that name.
exception:
  StandardException - thrown on ambiguity



getOrderByColumn
public ResultColumn getOrderByColumn(String columnName, TableName tableName) throws StandardException(Code)
For order by, get a ResultColumn that matches the specified columnName.
Parameters:
  columnName - The ResultColumn to get from the list
Parameters:
  tableName - The table name on the OrderByColumn, if any the column that matches that name.
exception:
  StandardException - thrown on ambiguity



getOrderBySelect
public int getOrderBySelect()(Code)



getReferencedFormatableBitSet
FormatableBitSet getReferencedFormatableBitSet(boolean positionedUpdate, boolean always, boolean onlyBCNs)(Code)
Generate a FormatableBitSet representing the columns that are referenced in this RCL. The caller decides if they want this FormatableBitSet if every RC is referenced.
Parameters:
  positionedUpdate - Whether or not the scan that the RCL belongs to is for update w/o a column list
Parameters:
  always - Whether or not caller always wants a non-null FormatableBitSet ifall RCs are referenced.
Parameters:
  onlyBCNs - If true, only set bit if expression is a BaseColumnNode,otherwise set bit for all referenced RCs. The FormatableBitSet representing the referenced RCs.



getResultColumn
public ResultColumn getResultColumn(int position)(Code)
Get a ResultColumn from a column position (1-based) in the list
Parameters:
  position - The ResultColumn to get from the list (1-based) the column at that position.



getResultColumn
public ResultColumn getResultColumn(int colNum, ResultSetNode rsn, int[] whichRC) throws StandardException(Code)
Take a column position and a ResultSetNode and find the ResultColumn in this RCL whose source result set is the same as the received RSN and whose column position is the same as the received column position.
Parameters:
  colNum - The column position (w.r.t rsn) for which we're searching
Parameters:
  rsn - The result set node for which we're searching. The ResultColumn in this RCL whose source is column colNumin result set rsn. That ResultColumn's position w.r.t to this RCLis also returned via the whichRC parameter. If no match is found,return null and leave whichRC untouched.



getResultColumn
public ResultColumn getResultColumn(String columnName)(Code)
Get a ResultColumn that matches the specified columnName and mark the ResultColumn as being referenced.
Parameters:
  columnName - The ResultColumn to get from the list the column that matches that name.



getResultColumn
public ResultColumn getResultColumn(String columnsTableName, String columnName)(Code)
Get a ResultColumn that matches the specified columnName and mark the ResultColumn as being referenced.
Parameters:
  columnsTableName - Qualifying name for the column
Parameters:
  columnName - The ResultColumn to get from the list the column that matches that name.



getSortedByPosition
ResultColumn[] getSortedByPosition()(Code)
Return an array that contains references to the columns in this list sorted by position. The sorted array.



getStreamStorableColIds
public int[] getStreamStorableColIds(int heapColCount) throws StandardException(Code)
Return an array holding the 0 based heap offsets of the StreamStorable columns in this ResultColumnList. This returns null if this list does not contain any StreamStorableColumns. The list this returns does not contain duplicates. This should only be used for a resultColumnList the refers to a single heap such as the target for an Insert, Update or Delete.
Parameters:
  heapColCount - the number of heap columns
exception:
  StandardException - Thrown on error



getTotalColumnSize
public int getTotalColumnSize()(Code)
Get the size of all the columns added together. Does NOT include the column overhead that the store requires. Also, will be a very rough estimate for user types. the size



hasConsistentTypeInfo
public boolean hasConsistentTypeInfo() throws StandardException(Code)
Verify that all ResultColumns and their expressions have type information and that the type information between the respective RCs and expressions matches. boolean Whether or not the type information is consistent



incOrderBySelect
public void incOrderBySelect()(Code)



isCloneable
public boolean isCloneable()(Code)
Return whether or not this RCL can be flattened out of a tree. It can only be flattened if the expressions are all cloneable. boolean Whether or not this RCL can be flattened out of a tree.



isExactTypeAndLengthMatch
public boolean isExactTypeAndLengthMatch(ResultColumnList otherRCL) throws StandardException(Code)
Do the 2 RCLs have the same type & length. This is useful for UNIONs when deciding whether a NormalizeResultSet is required.
Parameters:
  otherRCL - The other RCL. boolean Whether or not there is an exact UNION type match on the 2 RCLs.



makeResultDescriptors
public ResultColumnDescriptor[] makeResultDescriptors()(Code)
Make a ResultDescription for use in a ResultSet. This is useful when generating/executing a NormalizeResultSet, since it can appear anywhere in the tree. A ResultDescription for this ResultSetNode.



makeResultDescriptors
ResultColumnDescriptor[] makeResultDescriptors(ExecutionContext ec)(Code)



mapSourceColumns
int[] mapSourceColumns()(Code)
Map the source columns to these columns. Build an array to represent the mapping. For each RC, if the expression is simply a VCN or a CR then set the array element to be the virtual column number of the source RC. Otherwise, set the array element to -1. This is useful for determining if we need to do reflection at execution time. Array representiong mapping of RCs to source RCs.



markAllUnreferenced
public void markAllUnreferenced() throws StandardException(Code)
Walk the list and mark all RCs as unreferenced. This is useful when recalculating which RCs are referenced at what level like when deciding which columns need to be returned from a non-matching index scan (as opposed to those returned from the base table).
exception:
  StandardException - Thrown on error



markColumnsInSelectListUpdatableByCursor
void markColumnsInSelectListUpdatableByCursor(Vector updateColumns)(Code)
Mark all the columns in the select sql that this result column list represents as updatable if they match the columns in the given update column list.
Parameters:
  updateColumns - A Vector representing the columnsto be updated.



markInitialSize
protected void markInitialSize()(Code)



markUpdatableByCursor
void markUpdatableByCursor()(Code)
Mark all the (base) columns in this list as updatable by a positioned update statement. This is necessary for positioned update statements, because we expand the column list to include all the columns in the base table, and we need to be able to tell which ones the user is really trying to update so we can determine correctly whether all the updated columns are in the "for update" list.



markUpdatableByCursor
void markUpdatableByCursor(Vector updateColumns)(Code)
Mark as updatable all the columns in this result column list that match the columns in the given update column list
Parameters:
  updateColumns - A Vector representing the columnsto be updated.



markUpdated
void markUpdated()(Code)
Mark all the columns in this list as updated by an update statement.



markUpdated
void markUpdated(ResultColumnList updateColumns)(Code)
Mark as updatable all the columns in this result column list that match the columns in the given update column list.
Parameters:
  updateColumns - A ResultColumnList representing the columnsto be updated.



nameAllResultColumns
public void nameAllResultColumns() throws StandardException(Code)
Generate (unique across the entire statement) column names for those ResultColumns in this list which are not named.
exception:
  StandardException - Thrown on error



nopProjection
public boolean nopProjection(ResultColumnList childRCL)(Code)
Determine whether this RCL is a No-Op projection of the given RCL. It only makes sense to do this if the given RCL is from the child result set of the ProjectRestrict that this RCL is from.
Parameters:
  childRCL - The ResultColumnList of the child result set. true if this RCL is a No-Op projection of the given RCL.



populate
public void populate(TableDescriptor table, int[] columnIDs) throws StandardException(Code)
Build this ResultColumnList from a table description and an array of column IDs.
Parameters:
  table - describes the table
Parameters:
  columnIDs - column positions in that table (1-based)
exception:
  StandardException - Thrown on error



preprocess
public void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException(Code)
Preprocess the expression trees under the RCL. We do a number of transformations here (including subqueries, IN lists, LIKE and BETWEEN) plus subquery flattening. NOTE: This is done before the outer ResultSetNode is preprocessed.
Parameters:
  numTables - Number of tables in the DML Statement
Parameters:
  outerFromList - FromList from outer query block
Parameters:
  outerSubqueryList - SubqueryList from outer query block
Parameters:
  outerPredicateList - PredicateList from outer query block
exception:
  StandardException - Thrown on error



propagateDCLInfo
public void propagateDCLInfo(ResultColumnList derivedRCL, String tableName) throws StandardException(Code)
Validate the derived column list (DCL) and propagate the info from the list to the final ResultColumnList.
Parameters:
  derivedRCL - The derived column list
Parameters:
  tableName - The table name for the FromTable
exception:
  StandardException - Thrown on error



pullVirtualIsReferenced
void pullVirtualIsReferenced()(Code)
Or in any isReferenced booleans from the virtual column chain. That is the isReferenced bits on each ResultColumn on the list will be set if the ResultColumn is referenced or if any VirtualColumnNode in its expression chain refers to a referenced column.



recordColumnReferences
public void recordColumnReferences(int[] idArray, int basis)(Code)
Record the column ids of the referenced columns in the specified array.
Parameters:
  idArray - int[] for column ids
Parameters:
  basis - 0 (for 0-based ids) or 1 (for 1-based ids)



recordColumnReferences
public void recordColumnReferences(boolean[] colArray1, JBitSet[] tableColMap, int tableNumber)(Code)
Record the top level ColumnReferences in the specified array and table map This is useful when checking for uniqueness conditions. NOTE: All top level CRs assumed to be from the same table. The size of the array is expected to be the # of columns in the table of interest + 1, so we use 1-base column #s.
Parameters:
  colArray1 - boolean[] for columns
Parameters:
  tableColMap - JBitSet[] for tables
Parameters:
  tableNumber - Table number of column references



rejectParameters
void rejectParameters() throws StandardException(Code)
Look for and reject ? parameters under ResultColumns. This is done for SELECT statements.
exception:
  StandardException - Thrown if a ? parameter found directlyunder a ResultColumn



rejectXMLValues
void rejectXMLValues() throws StandardException(Code)
Check for (and reject) XML values directly under the ResultColumns. This is done for SELECT/VALUES statements. We reject values in this case because JDBC does not define an XML type/binding and thus there's no standard way to pass such a type back to a JDBC application. Note that we DO allow an XML column in a top-level RCL IF that column was added to the RCL by _us_ instead of by the user. For example, if we have a table: create table t1 (i int, x xml) and the user query is: select i from t1 order by x the "x" column will be added (internally) to the RCL as part of ORDER BY processing--and so we need to allow that XML column to be bound without throwing an error. If, as in this case, the XML column reference is invalid (we can't use ORDER BY on an XML column because XML values aren't ordered), a more appropriate error message should be returned to the user in later processing. If we didn't allow for this, the user would get an error saying that XML columns are not valid as part of the result set--but as far as s/he knows, there isn't such a column: only "i" is supposed to be returned (the RC for "x" was added to the RCL by _us_ as part of ORDER BY processing). ASSUMPTION: Any RCs that are generated internally and added to this RCL (before this RCL is bound) are added at the _end_ of the list. If that's true, then any RC with an index greater than the size of the initial (user-specified) list must have been added internally and will not be returned to the user.
exception:
  StandardException - Thrown if an XML value founddirectly under a ResultColumn



remapColumnReferencesToExpressions
public void remapColumnReferencesToExpressions() throws StandardException(Code)
Remap all ColumnReferences in this tree to be clones of the underlying expression.
exception:
  StandardException - Thrown on error



removeJoinColumns
void removeJoinColumns(ResultColumnList joinColumns)(Code)
Remove the columns which are join columns (in the joinColumns RCL) from this list. This is useful for a JOIN with a USING clause.
Parameters:
  joinColumns - The list of join columns



replaceDefaults
void replaceDefaults(TableDescriptor ttd, ResultColumnList tcl) throws StandardException(Code)
Replace any DEFAULTs with the associated tree for the default.
Parameters:
  ttd - The TableDescriptor for the target table.
Parameters:
  tcl - The RCL for the target table.
exception:
  StandardException - Thrown on error



resetVirtualColumnIds
void resetVirtualColumnIds()(Code)
Reset the virtual column ids for all of the underlying RCs. (Virtual column ids are 1-based.)



reusableResult
boolean reusableResult()(Code)
Return whether or not the same result row can be used for all rows returned by the associated ResultSet. This is possible if all entries in the list are constants or AggregateNodes. Whether or not the same result row can be used for allrows returned by the associated ResultSet.



setClause
public void setClause(int clause)(Code)



setCountMismatchAllowed
protected void setCountMismatchAllowed(boolean allowed)(Code)
Set the value of whether or not a count mismatch is allowed between this RCL, as a derived column list, and an underlying RCL. This is allowed for SELECT * views when an underlying table has had columns added to it via ALTER TABLE.
Parameters:
  allowed - Whether or not a mismatch is allowed.



setIndexRow
void setIndexRow(long cid, boolean forUpdate)(Code)



setNullability
public void setNullability(boolean nullability)(Code)
Set the nullability of every ResultColumn in this list



setRedundant
public void setRedundant()(Code)
Mark all of the ResultColumns as redundant. Useful when chopping a ResultSetNode out of a tree when there are still references to its RCL.



setResultSetNumber
public void setResultSetNumber(int resultSetNumber)(Code)
Set the resultSetNumber in all of the ResultColumns.
Parameters:
  resultSetNumber - The resultSetNumber



setUnionResultExpression
public void setUnionResultExpression(ResultColumnList otherRCL, int tableNumber, int level, String operatorName) throws StandardException(Code)
Set up the result expressions for a UNION, INTERSECT, or EXCEPT: o Verify union type compatiblity o Get dominant type for result (type + max length + nullability) o Create a new ColumnReference with dominant type and name of from this RCL and make that the new expression. o Set the type info for in the ResultColumn to the dominant type NOTE - We are assuming that caller has generated a new RCL for the UNION with the same names as the left side's RCL and copies of the expressions.
Parameters:
  otherRCL - RCL from other side of the UNION.
Parameters:
  tableNumber - The tableNumber for the UNION.
Parameters:
  level - The nesting level for the UNION.
Parameters:
  operatorName - "UNION", "INTERSECT", or "EXCEPT"
exception:
  StandardException - Thrown on error



sortMe
public int[] sortMe()(Code)
Return an array of all my column positions, sorted in ascending order. a sorted array



treePrint
public void treePrint(int depth)(Code)
This class needs a treePrint method, even though it is not a descendant of QueryTreeNode, because its members contain tree nodes, and these have to be printed and indented properly.
Parameters:
  depth - The depth at which to indent the sub-nodes



updatableByCursor
boolean updatableByCursor(int columnPosition)(Code)
Returns true if the given column position is for a column that will be or could be updated by the positioned update of a cursor.
Parameters:
  columnPosition - The position of the column in question true if the column is updatable



updateOverlaps
public boolean updateOverlaps(int[] columns)(Code)
Does the column list contain any of the given column positions that are updated? Implements same named routine in UpdateList.
Parameters:
  columns - An array of column positions True if this column list contains any of the given columns



verifyAllOrderable
void verifyAllOrderable() throws StandardException(Code)
Verify that all of the RCs in this list are comparable.
exception:
  StandardException - Thrown on error



verifyCreateConstraintColumnList
public String verifyCreateConstraintColumnList(TableElementList tel)(Code)
Verify that all of the column names in this list are contained within the ColumnDefinitionNodes within the TableElementList. String The 1st column name, if any, that is not in the list.



verifyUniqueNames
public String verifyUniqueNames(boolean errForGenCols) throws StandardException(Code)
Check the uniqueness of the column names within a column list.
Parameters:
  errForGenCols - Raise an error for any generated column names. String The first duplicate column name, if any.



Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNodeVector
public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc)
final void addElement(QueryTreeNode qt)(Code)(Java Doc)
void destructiveAppend(QueryTreeNodeVector qtnv)(Code)(Java Doc)
QueryTreeNode elementAt(int index)(Code)(Java Doc)
final int indexOf(QueryTreeNode qt)(Code)(Java Doc)
final void insertElementAt(QueryTreeNode qt, int index)(Code)(Java Doc)
void nondestructiveAppend(QueryTreeNodeVector qtnv)(Code)(Java Doc)
final Object remove(int index)(Code)(Java Doc)
final void removeAllElements()(Code)(Java Doc)
final void removeElement(QueryTreeNode qt)(Code)(Java Doc)
final void removeElementAt(int index)(Code)(Java Doc)
final void setElementAt(QueryTreeNode qt, int index)(Code)(Java Doc)
final public int size()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Fields inherited from org.apache.derby.impl.sql.compile.QueryTreeNode
final public static int AUTOINCREMENT_CREATE_MODIFY(Code)(Java Doc)
final public static int AUTOINCREMENT_INC_INDEX(Code)(Java Doc)
final public static int AUTOINCREMENT_IS_AUTOINCREMENT_INDEX(Code)(Java Doc)
final public static int AUTOINCREMENT_START_INDEX(Code)(Java Doc)
boolean isPrivilegeCollectionRequired(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNode
public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc)
public QueryTreeNode bind() throws StandardException(Code)(Java Doc)
public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)(Java Doc)
protected static void debugFlush()(Code)(Java Doc)
public static void debugPrint(String outputString)(Code)(Java Doc)
public void disablePrivilegeCollection()(Code)(Java Doc)
public String executeSchemaName()(Code)(Java Doc)
public String executeStatementName()(Code)(Java Doc)
public static String formatNodeString(String nodeString, int depth)(Code)(Java Doc)
public boolean foundString(String[] list, String search)(Code)(Java Doc)
public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)(Java Doc)
protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)(Java Doc)
public int getBeginOffset()(Code)(Java Doc)
final protected ClassFactory getClassFactory()(Code)(Java Doc)
final protected CompilerContext getCompilerContext()(Code)(Java Doc)
final public ContextManager getContextManager()(Code)(Java Doc)
public Object getCursorInfo() throws StandardException(Code)(Java Doc)
final public DataDictionary getDataDictionary()(Code)(Java Doc)
final public DependencyManager getDependencyManager()(Code)(Java Doc)
public int getEndOffset()(Code)(Java Doc)
final public ExecutionFactory getExecutionFactory()(Code)(Java Doc)
final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)(Java Doc)
protected int getIntProperty(String value, String key) throws StandardException(Code)(Java Doc)
final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc)
final public NodeFactory getNodeFactory()(Code)(Java Doc)
protected int getNodeType()(Code)(Java Doc)
public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)(Java Doc)
public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)(Java Doc)
public long getRowEstimate()(Code)(Java Doc)
public String getSPSName()(Code)(Java Doc)
final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)(Java Doc)
final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)(Java Doc)
protected int getStatementType()(Code)(Java Doc)
final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)(Java Doc)
final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)(Java Doc)
public void init(Object arg1) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) throws StandardException(Code)(Java Doc)
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) throws StandardException(Code)(Java Doc)
public boolean isAtomic() throws StandardException(Code)(Java Doc)
protected boolean isInstanceOf(int nodeType)(Code)(Java Doc)
public boolean isPrivilegeCollectionRequired()(Code)(Java Doc)
final boolean isSessionSchema(SchemaDescriptor sd)(Code)(Java Doc)
final boolean isSessionSchema(String schemaName)(Code)(Java Doc)
public ConstantAction makeConstantAction() throws StandardException(Code)(Java Doc)
public ResultDescription makeResultDescription() throws StandardException(Code)(Java Doc)
public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)(Java Doc)
public boolean needsSavepoint()(Code)(Java Doc)
protected String nodeHeader()(Code)(Java Doc)
public QueryTreeNode optimize() throws StandardException(Code)(Java Doc)
public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)(Java Doc)
public void printLabel(int depth, String label)(Code)(Java Doc)
public void printSubNodes(int depth)(Code)(Java Doc)
public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc)
public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)(Java Doc)
public void setBeginOffset(int beginOffset)(Code)(Java Doc)
public void setContextManager(ContextManager cm)(Code)(Java Doc)
public void setEndOffset(int endOffset)(Code)(Java Doc)
public void setNodeType(int nodeType)(Code)(Java Doc)
public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void treePrint()(Code)(Java Doc)
public void treePrint(int depth)(Code)(Java Doc)
String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.