Java Doc for InsertNode.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.StatementNode
         org.apache.derby.impl.sql.compile.DMLStatementNode
            org.apache.derby.impl.sql.compile.DMLModStatementNode
               org.apache.derby.impl.sql.compile.InsertNode

InsertNode
final public class InsertNode extends DMLModStatementNode (Code)
An InsertNode is the top node in a query tree for an insert statement.

After parsing, the node contains targetTableName: the target table for the insert collist: a list of column names, if specified queryexpr: the expression being inserted, either a values clause or a select form; both of these are represented via the SelectNode, potentially with a TableOperatorNode such as UnionNode above it.

After binding, the node has had the target table's descriptor located and inserted, and the queryexpr and collist have been massaged so that they are identical to the table layout. This involves adding any default values for missing columns, and reordering the columns to match the table's ordering of them.

After optimizing, ...



Field Summary
protected  RowLocation[]autoincRowLocation
    
protected  booleanbulkInsert
    
public  ValueNodecheckConstraints
    
public  booleandeferred
    
public  FKInfofkInfo
    
public  ResultColumnListtargetColumnList
    
public  PropertiestargetProperties
    


Method Summary
public  QueryTreeNodebind()
     Bind this InsertNode.
public  voidgenerate(ActivationClassBuilder acb, MethodBuilder mb)
    
public  boolean[]getIndexedCols()
     Create a boolean[] to track the (0-based) columns which are indexed.
 intgetPrivType()
    
final protected  intgetStatementType()
     Return the type of statement, something from StatementType.
final static  intgetStatementType(Properties targetProperties)
     Return the statement type, where it is dependent on the targetProperties.
public  voidinit(Object targetName, Object insertColumns, Object queryExpression, Object targetProperties)
     Initializer for an InsertNode.
Parameters:
  targetName - The name of the table/VTI to insert into
Parameters:
  insertColumns - A ResultColumnList with the names of thecolumns to insert into.
public  ConstantActionmakeConstantAction()
    
public  voidprintSubNodes(int depth)
     Prints the sub-nodes of this object.
public  booleanreferencesSessionSchema()
    
public  StringstatementToString()
    
public  StringtoString()
     Convert this object to a String.

Field Detail
autoincRowLocation
protected RowLocation[] autoincRowLocation(Code)



bulkInsert
protected boolean bulkInsert(Code)



checkConstraints
public ValueNode checkConstraints(Code)



deferred
public boolean deferred(Code)



fkInfo
public FKInfo fkInfo(Code)



targetColumnList
public ResultColumnList targetColumnList(Code)



targetProperties
public Properties targetProperties(Code)





Method Detail
bind
public QueryTreeNode bind() throws StandardException(Code)
Bind this InsertNode. 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.

Binding an insert will also massage the tree so that the collist and select column order/number are the same as the layout of the table in the store. The bound query tree
exception:
  StandardException - Thrown on error




generate
public void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)
Code generation for insert creates an expression for: ResultSetFactory.getInsertResultSet(resultSet.generate(ps), this )
Parameters:
  acb - The ActivationClassBuilder for the class being built
Parameters:
  mb - the method for the execute() method to be built
exception:
  StandardException - Thrown on error



getIndexedCols
public boolean[] getIndexedCols() throws StandardException(Code)
Create a boolean[] to track the (0-based) columns which are indexed. A boolean[] to track the (0-based) columns which are indexed.
exception:
  StandardException - Thrown on failure



getPrivType
int getPrivType()(Code)



getStatementType
final protected int getStatementType()(Code)
Return the type of statement, something from StatementType. the type of statement



getStatementType
final static int getStatementType(Properties targetProperties)(Code)
Return the statement type, where it is dependent on the targetProperties. (insertMode = replace causes statement type to be BULK_INSERT_REPLACE. the type of statement



init
public void init(Object targetName, Object insertColumns, Object queryExpression, Object targetProperties)(Code)
Initializer for an InsertNode.
Parameters:
  targetName - The name of the table/VTI to insert into
Parameters:
  insertColumns - A ResultColumnList with the names of thecolumns to insert into. May be null if theuser did not specify the columns - in thiscase, the binding phase will have to figureit out.
Parameters:
  queryExpression - The query expression that will generatethe rows to insert into the given table
Parameters:
  targetProperties - The properties specified on the target table



makeConstantAction
public ConstantAction makeConstantAction() throws StandardException(Code)
Compile constants that Execution will use
exception:
  StandardException - Thrown on failure



printSubNodes
public void printSubNodes(int depth)(Code)
Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.
Parameters:
  depth - The depth of this node in the tree



referencesSessionSchema
public boolean referencesSessionSchema() throws StandardException(Code)
Return true if the node references SESSION schema tables (temporary or permanent) true if references SESSION schema tables, else false
exception:
  StandardException - Thrown on error



statementToString
public String statementToString()(Code)



toString
public String toString()(Code)
Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing. This object as a String



Fields inherited from org.apache.derby.impl.sql.compile.DMLModStatementNode
protected int[][] fkColArrays(Code)(Java Doc)
protected ColumnDescriptorList[] fkColDescriptors(Code)(Java Doc)
protected long[] fkIndexConglomNumbers(Code)(Java Doc)
protected FKInfo[] fkInfo(Code)(Java Doc)
protected int[] fkRefActions(Code)(Java Doc)
protected String[] fkTableNames(Code)(Java Doc)
protected Hashtable graphHashTable(Code)(Java Doc)
public long[] indexConglomerateNumbers(Code)(Java Doc)
public String[] indexNames(Code)(Java Doc)
public IndexRowGenerator[] indicesToMaintain(Code)(Java Doc)
protected boolean isDependentTable(Code)(Java Doc)
protected int lockMode(Code)(Java Doc)
protected ConstraintDescriptorList relevantCdl(Code)(Java Doc)
protected GenericDescriptorList relevantTriggers(Code)(Java Doc)
protected ResultColumnList resultColumnList(Code)(Java Doc)
protected TableName synonymTableName(Code)(Java Doc)
public TableDescriptor targetTableDescriptor(Code)(Java Doc)
protected TableName targetTableName(Code)(Java Doc)
protected FromVTI targetVTI(Code)(Java Doc)
protected TriggerInfo triggerInfo(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.sql.compile.DMLModStatementNode
protected void adjustDeferredFlag(boolean adjustment)(Code)(Java Doc)
public void bindCheckConstraint(NodeFactory nodeFactory, TableDescriptor targetTableDescriptor, ResultColumnList sourceRCL, ValueNode checkConstraint) throws StandardException(Code)(Java Doc)
public ValueNode bindConstraints(DataDictionary dataDictionary, NodeFactory nodeFactory, TableDescriptor targetTableDescriptor, Dependent dependent, ResultColumnList sourceRCL, int[] changedColumnIds, FormatableBitSet readColsBitSet, boolean skipCheckConstraints, boolean includeTriggers) throws StandardException(Code)(Java Doc)
public void generateCheckConstraints(ValueNode checkConstraints, ExpressionClassBuilder ecb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
public MethodBuilder generateCheckConstraints(ValueNode checkConstraints, ExpressionClassBuilder ecb) throws StandardException(Code)(Java Doc)
protected void generateCodeForTemporaryTable(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
protected void getAffectedIndexes(TableDescriptor td, ResultColumnList updatedColumns, FormatableBitSet colBitSet) throws StandardException(Code)(Java Doc)
protected ConstraintDescriptorList getAllRelevantConstraints(DataDictionary dd, TableDescriptor td, boolean skipCheckConstraints, int[] changedColumnIds) throws StandardException(Code)(Java Doc)
protected GenericDescriptorList getAllRelevantTriggers(DataDictionary dd, TableDescriptor td, int[] changedColumnIds, boolean includeTriggers) throws StandardException(Code)(Java Doc)
public ValueNode getCheckConstraints()(Code)(Java Doc)
public FKInfo[] getFKInfo()(Code)(Java Doc)
public static int[] getReadColMap(int column_map_length, FormatableBitSet readColsBitSet)(Code)(Java Doc)
protected void getResultColumnList() throws StandardException(Code)(Java Doc)
protected FromBaseTable getResultColumnList(ResultColumnList inputRcl) throws StandardException(Code)(Java Doc)
public SchemaDescriptor getSchemaDescriptor() throws StandardException(Code)(Java Doc)
public TriggerInfo getTriggerInfo()(Code)(Java Doc)
static void getXAffectedIndexes(TableDescriptor baseTable, ResultColumnList updatedColumns, FormatableBitSet colBitSet, Vector conglomVector) throws StandardException(Code)(Java Doc)
protected boolean hasCheckConstraints(DataDictionary dd, TableDescriptor td) throws StandardException(Code)(Java Doc)
public void init(Object resultSet)(Code)(Java Doc)
public void init(Object resultSet, Object statementType)(Code)(Java Doc)
public boolean isAtomic()(Code)(Java Doc)
protected void markAffectedIndexes(Vector affectedConglomerates) throws StandardException(Code)(Java Doc)
public void normalizeSynonymColumns(ResultColumnList rcl, TableName targetTableName) throws StandardException(Code)(Java Doc)
public QueryTreeNode optimize() throws StandardException(Code)(Java Doc)
public ValueNode parseCheckConstraint(String checkConstraintText, TableDescriptor td) throws StandardException(Code)(Java Doc)
public boolean requiresDeferredProcessing()(Code)(Java Doc)
public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc)
void setTarget(QueryTreeNode targetName)(Code)(Java Doc)
public String statementToString()(Code)(Java Doc)
void verifyTargetTable() throws StandardException(Code)(Java Doc)

Fields inherited from org.apache.derby.impl.sql.compile.DMLStatementNode
ResultSetNode resultSet(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.sql.compile.DMLStatementNode
public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc)
int activationKind()(Code)(Java Doc)
public QueryTreeNode bind(DataDictionary dataDictionary) throws StandardException(Code)(Java Doc)
protected void bindExpressions() throws StandardException(Code)(Java Doc)
protected void bindExpressionsWithTables() throws StandardException(Code)(Java Doc)
public QueryTreeNode bindResultSetsWithTables(DataDictionary dataDictionary) throws StandardException(Code)(Java Doc)
protected void bindTables(DataDictionary dataDictionary) throws StandardException(Code)(Java Doc)
void generateParameterValueSet(ActivationClassBuilder acb) throws StandardException(Code)(Java Doc)
int getPrivType()(Code)(Java Doc)
public ResultSetNode getResultSetNode()(Code)(Java Doc)
public void init(Object resultSet)(Code)(Java Doc)
public boolean isAtomic() throws StandardException(Code)(Java Doc)
public ResultDescription makeResultDescription()(Code)(Java Doc)
public QueryTreeNode optimize() throws StandardException(Code)(Java Doc)
public void printSubNodes(int depth)(Code)(Java Doc)

Fields inherited from org.apache.derby.impl.sql.compile.StatementNode
final static int NEED_CURSOR_ACTIVATION(Code)(Java Doc)
final static int NEED_DDL_ACTIVATION(Code)(Java Doc)
final static int NEED_NOTHING_ACTIVATION(Code)(Java Doc)
final static int NEED_PARAM_ACTIVATION(Code)(Java Doc)
final static int NEED_ROW_ACTIVATION(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.sql.compile.StatementNode
abstract int activationKind()(Code)(Java Doc)
public GeneratedClass generate(ByteArray byteCode) throws StandardException(Code)(Java Doc)
public boolean isAtomic() throws StandardException(Code)(Java Doc)
protected TableDescriptor lockTableForCompilation(TableDescriptor td) throws StandardException(Code)(Java Doc)
abstract public String statementToString()(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.