org.apache.derby.impl.sql.compile
Class ConcatenationOperatorNode

java.lang.Object
  extended byorg.apache.derby.impl.sql.compile.QueryTreeNode
      extended byorg.apache.derby.impl.sql.compile.ValueNode
          extended byorg.apache.derby.impl.sql.compile.BinaryOperatorNode
              extended byorg.apache.derby.impl.sql.compile.ConcatenationOperatorNode
All Implemented Interfaces:
Visitable

public class ConcatenationOperatorNode
extends BinaryOperatorNode

This node represents a concatenation comparison operator

Author:
Jerry Brenner -- modified by jamie for bit and bit varying.

Field Summary
 
Fields inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode
AND, BinaryArgTypes, BinaryMethodNames, BinaryOperators, BinaryResultTypes, CONCATENATE, DIVIDE, EQ, GE, GT, LE, leftInterfaceType, leftOperand, LIKE, LT, methodName, MINUS, NE, operator, operatorType, OR, PLUS, receiver, resultInterfaceType, rightInterfaceType, rightOperand, TIMES, XMLEXISTS_OP
 
Fields inherited from class org.apache.derby.impl.sql.compile.ValueNode
clause, dataTypeServices, IN_HAVING_CLAUSE, IN_SELECT_LIST, IN_UNKNOWN_CLAUSE, IN_WHERE_CLAUSE, transformed
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset
 
Constructor Summary
ConcatenationOperatorNode()
           
 
Method Summary
 ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, java.util.Vector aggregateVector)
          overrides BindOperatorNode.bindExpression because concatenation has special requirements for parameter binding.
private static int clobBlobHandling(DataTypeDescriptor clobBlobType, DataTypeDescriptor otherType)
           
 void init(java.lang.Object leftOperand, java.lang.Object rightOperand)
          Initializer for a ConcatenationOperatorNode
protected  void initializeResultField(ExpressionClassBuilder acb, MethodBuilder mb, LocalField resultField)
           
private  DataTypeDescriptor resolveConcatOperation(DataTypeDescriptor leftType, DataTypeDescriptor rightType)
          Resolve a concatenation operator
 
Methods inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode
accept, bindXMLExists, categorize, constantExpression, generateExpression, genSQLJavaSQLTree, getLeftOperand, getOrderableVariantType, getReceiverInterfaceName, getRightOperand, init, init, init, isConstantExpression, preprocess, printSubNodes, remapColumnReferencesToExpressions, setClause, setLeftOperand, setLeftRightInterfaceType, setMethodName, setOperator, setRightOperand, swapOperands, toString
 
Methods inherited from class org.apache.derby.impl.sql.compile.ValueNode
bindExpression, changeToCNF, checkIsBoolean, checkReliability, checkReliability, checkTopPredicatesForEqualsConditions, copyFields, eliminateNots, genEqualsFalseTree, generate, generateFilter, genIsNullTree, getClause, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isParameterNode, isRelationalOperator, optimizableEqualityNode, putAndsOnTop, selectivity, setDescriptor, setTransformed, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTop
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
bind, convertDefaultNode, debugFlush, debugPrint, executeSchemaName, executeStatementName, formatNodeString, foundString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getSPSName, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isSessionSchema, isSessionSchema, makeConstantAction, makeResultDescription, makeTableName, needsSavepoint, nodeHeader, optimize, parseQueryText, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, treePrint, treePrint, verifyClassExist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConcatenationOperatorNode

public ConcatenationOperatorNode()
Method Detail

init

public void init(java.lang.Object leftOperand,
                 java.lang.Object rightOperand)
Initializer for a ConcatenationOperatorNode

Overrides:
init in class QueryTreeNode
Parameters:
leftOperand - The left operand of the concatenation
rightOperand - The right operand of the concatenation

bindExpression

public ValueNode bindExpression(FromList fromList,
                                SubqueryList subqueryList,
                                java.util.Vector aggregateVector)
                         throws StandardException
overrides BindOperatorNode.bindExpression because concatenation has special requirements for parameter binding.

Overrides:
bindExpression in class BinaryOperatorNode
Parameters:
fromList - The FROM list for the query this expression is in, for binding columns.
subqueryList - The subquery list being built as we find SubqueryNodes
aggregateVector - The aggregate vector being built as we find AggregateNodes
Returns:
The new top of the expression tree.
Throws:
StandardException - thrown on failure

resolveConcatOperation

private DataTypeDescriptor resolveConcatOperation(DataTypeDescriptor leftType,
                                                  DataTypeDescriptor rightType)
                                           throws StandardException
Resolve a concatenation operator

Parameters:
leftType - The DataTypeDescriptor of the left operand
rightType - The DataTypeDescriptor of the right operand
Returns:
A DataTypeDescriptor telling the result type of the concatenate operation
Throws:
StandardException - BinaryOperatorNotSupported Thrown when a BinaryOperator is not supported on the operand types.

initializeResultField

protected void initializeResultField(ExpressionClassBuilder acb,
                                     MethodBuilder mb,
                                     LocalField resultField)
Overrides:
initializeResultField in class BinaryOperatorNode

clobBlobHandling

private static int clobBlobHandling(DataTypeDescriptor clobBlobType,
                                    DataTypeDescriptor otherType)
                             throws StandardException
Throws:
StandardException

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.