com.akiban.sql.parser
Class ExtractOperatorNode

java.lang.Object
  extended by com.akiban.sql.parser.QueryTreeNode
      extended by com.akiban.sql.parser.ValueNode
          extended by com.akiban.sql.parser.UnaryOperatorNode
              extended by com.akiban.sql.parser.ExtractOperatorNode
All Implemented Interfaces:
Visitable

public class ExtractOperatorNode
extends UnaryOperatorNode

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


Nested Class Summary
static class ExtractOperatorNode.Field
           
 
Field Summary
 
Fields inherited from class com.akiban.sql.parser.UnaryOperatorNode
methodName, operator, receiverInterfaceType, resultInterfaceType
 
Fields inherited from class com.akiban.sql.parser.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
 
Constructor Summary
ExtractOperatorNode()
           
 
Method Summary
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 void init(Object field, Object operand)
          Initializer for a ExtractOperatorNode
 String toString()
          Convert this object to a String.
 
Methods inherited from class com.akiban.sql.parser.UnaryOperatorNode
getMethodName, getOperand, getOperator, init, init, isEquivalent, printSubNodes, setOperand
 
Methods inherited from class com.akiban.sql.parser.ValueNode
getColumnName, getSchemaName, getSourceResultColumn, getTableName, getType, getTypeId, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isConstantExpression, isInListProbeNode, isParameterNode, isRelationalOperator, isSameNodeType, setNullability, setType
 
Methods inherited from class com.akiban.sql.parser.QueryTreeNode
accept, convertDefaultNode, debugFlush, debugPrint, formatNodeString, getBeginOffset, getDebugOutput, getEndOffset, getNodeFactory, getNodeType, getNullNode, getParserContext, getStatementType, getUserData, init, init, init, init, init, init, init, init, init, init, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, setBeginOffset, setDebugOutput, setEndOffset, setNodeType, setParserContext, setUserData, stackPrint, treePrint, treePrint, treePrint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtractOperatorNode

public ExtractOperatorNode()
Method Detail

init

public void init(Object field,
                 Object operand)
          throws StandardException
Initializer for a ExtractOperatorNode

Overrides:
init in class QueryTreeNode
Parameters:
field - The field to extract
operand - The operand
Throws:
StandardException - Thrown on error

copyFrom

public void copyFrom(QueryTreeNode node)
              throws StandardException
Fill this node with a deep copy of the given node.

Overrides:
copyFrom in class UnaryOperatorNode
Throws:
StandardException

toString

public String toString()
Description copied from class: UnaryOperatorNode
Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.

Overrides:
toString in class UnaryOperatorNode
Returns:
This object as a String


Copyright © 2013 Akiban Technologies, Inc. All rights reserved.