org.apache.derby.impl.sql.compile
Class TestConstraintNode
java.lang.Object
org.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.ValueNode
org.apache.derby.impl.sql.compile.UnaryOperatorNode
org.apache.derby.impl.sql.compile.UnaryLogicalOperatorNode
org.apache.derby.impl.sql.compile.TestConstraintNode
- All Implemented Interfaces:
- Visitable
public class TestConstraintNode
- extends UnaryLogicalOperatorNode
A TestConstraintNode is used to determine when a constraint
has been violated.
Fields inherited from class org.apache.derby.impl.sql.compile.UnaryOperatorNode |
methodName, operand, operator, receiverInterfaceType, resultInterfaceType, UnaryArgTypes, UnaryMethodNames, UnaryOperators, UnaryResultTypes, XMLPARSE_OP, XMLSERIALIZE_OP |
Methods inherited from class org.apache.derby.impl.sql.compile.UnaryOperatorNode |
acceptChildren, addXmlOpMethodParams, bindOperand, bindParameter, categorize, constantExpression, getOperand, getOperatorString, getOrderableVariantType, getParameterOperand, getReceiverInterfaceName, init, init, isConstantExpression, isEquivalent, preprocess, printSubNodes, remapColumnReferencesToExpressions, setMethodName, setOperator, toString |
Methods inherited from class org.apache.derby.impl.sql.compile.ValueNode |
bindExpression, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, eliminateNots, evaluateConstantExpressions, genEqualsFalseTree, generate, generateFilter, genIsNullTree, genSQLJavaSQLTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isInListProbeNode, isParameterNode, isRelationalOperator, isSameNodeType, optimizableEqualityNode, putAndsOnTop, requiresTypeFromContext, selectivity, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTop |
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
accept, bindOffsetFetch, bindRowMultiSet, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
sqlState
private java.lang.String sqlState
tableName
private java.lang.String tableName
constraintName
private java.lang.String constraintName
TestConstraintNode
public TestConstraintNode()
init
public void init(java.lang.Object booleanValue,
java.lang.Object sqlState,
java.lang.Object tableName,
java.lang.Object constraintName)
- Initializer for a TestConstraintNode
- Overrides:
init
in class QueryTreeNode
- Parameters:
booleanValue
- The operand of the constraint testsqlState
- The SQLState of the exception to throw if the
constraint has failedtableName
- The name of the table that the constraint is onconstraintName
- The name of the constraint being checked
bindExpression
public ValueNode bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.Vector aggregateVector)
throws StandardException
- Bind this logical operator. All that has to be done for binding
a logical operator is to bind the operand, check that the operand
is SQLBoolean, and set the result type to SQLBoolean.
- Overrides:
bindExpression
in class UnaryLogicalOperatorNode
- Parameters:
fromList
- The query's FROM listsubqueryList
- The subquery list being built as we find SubqueryNodesaggregateVector
- The aggregate vector being built as we find AggregateNodes
- Returns:
- The new top of the expression tree.
- Throws:
StandardException
- Thrown on error
generateExpression
public void generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
throws StandardException
- Do code generation for the TestConstraint operator.
- Overrides:
generateExpression
in class UnaryOperatorNode
- Parameters:
acb
- The ExpressionClassBuilder for the class we're generatingmb
- The method the expression will go into
- Throws:
StandardException
- Thrown on error
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.