Top Description Fields Constructors Methods
org.apache.derby.impl.sql.compile

pack-priv Class ExtractOperatorNode

extends UnaryOperatorNode
Class Inheritance
Imports
java.sql.Types, java.util.List, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.services.context.ContextManager, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.sql.compile.TypeCompiler, org.apache.derby.iapi.types.DataTypeDescriptor, .DateTimeDataValue, .TypeId

This node represents a unary extract operator, used to extract a field from a date/time. The field value is returned as an integer.

Field Summary

Modifier and TypeField and Description
private int
private static final String[]
private static final String[]
Inherited from org.apache.derby.impl.sql.compile.UnaryOperatorNode:
K_BASEK_XMLPARSEK_XMLSERIALIZEkindmethodNameoperandoperatorreceiverInterfaceTyperesultInterfaceTypeUnaryArgTypesUnaryMethodNamesUnaryOperatorsUnaryResultTypes

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv ValueNode

Returns:

The new top of the expression tree.
bindExpression
(FromList
The query's FROM list
fromList
,
SubqueryList
The subquery list being built as we find SubqueryNodes
subqueryList
,
List<AggregateNode>
The aggregate list being built as we find AggregateNodes
aggregates
)

Overrides org.apache.derby.impl.sql.compile.UnaryOperatorNode.bindExpression.

Bind this operator

public String
toString()

Overrides org.apache.derby.impl.sql.compile.UnaryOperatorNode.toString.

Convert this object to a String.

Inherited from org.apache.derby.impl.sql.compile.UnaryOperatorNode:
acceptChildrenaddXmlOpMethodParamsbindOperandbindParametercategorizeconstantExpressiongenerateExpressiongetOperandgetOperatorStringgetOrderableVariantTypegetParameterOperandgetReceiverInterfaceNameisConstantExpressionisEquivalentisSameNodeKindpreprocessprintSubNodesremapColumnReferencesToExpressionssetMethodNamesetOperator

Field Detail

extractFieldback to summary
private int extractField
fieldMethodback to summary
private static final String[] fieldMethod
fieldNameback to summary
private static final String[] fieldName

Constructor Detail

ExtractOperatorNodeback to summary
pack-priv ExtractOperatorNode(int field, ValueNode operand, ContextManager cm) throws StandardException

Method Detail

bindExpressionback to summary
pack-priv ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) throws StandardException

Overrides org.apache.derby.impl.sql.compile.UnaryOperatorNode.bindExpression.

Bind this operator

Parameters
fromList:FromList

The query's FROM list

subqueryList:SubqueryList

The subquery list being built as we find SubqueryNodes

aggregates:List<AggregateNode>

The aggregate list being built as we find AggregateNodes

Returns:ValueNode

The new top of the expression tree.

Annotations
@Override
Exceptions
StandardException:
Thrown on error
toStringback to summary
public String toString()

Overrides org.apache.derby.impl.sql.compile.UnaryOperatorNode.toString.

Doc from org.apache.derby.impl.sql.compile.UnaryOperatorNode.toString.

Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.

Returns:String

This object as a String

Annotations
@Override