com.akiban.sql.parser
Class CreateIndexNode

java.lang.Object
  extended by com.akiban.sql.parser.QueryTreeNode
      extended by com.akiban.sql.parser.StatementNode
          extended by com.akiban.sql.parser.DDLStatementNode
              extended by com.akiban.sql.parser.CreateIndexNode
All Implemented Interfaces:
IndexDefinition, Visitable

public class CreateIndexNode
extends DDLStatementNode
implements IndexDefinition

A CreateIndexNode is the root of a QueryTree that represents a CREATE INDEX statement.


Field Summary
 
Fields inherited from class com.akiban.sql.parser.DDLStatementNode
ADD_TYPE, DROP_TYPE, LOCKING_TYPE, MODIFY_TYPE, UNKNOWN_TYPE
 
Fields inherited from class com.akiban.sql.parser.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
 
Constructor Summary
CreateIndexNode()
           
 
Method Summary
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 IndexColumnList getColumnList()
           
 ExistenceCheck getExistenceCheck()
           
 IndexColumnList getIndexColumnList()
           
 TableName getIndexName()
           
 TableName getIndexTableName()
           
 String getIndexType()
           
 JoinNode.JoinType getJoinType()
           
 Properties getProperties()
           
 StorageLocation getStorageLocation()
           
 boolean getUniqueness()
           
 void init(Object unique, Object indexType, Object indexName, Object tableName, Object columnList, Object joinType, Object properties, Object existenceCheck, Object storageLocation)
          Initializer for a CreateIndexNode
 void printSubNodes(int depth)
          Print the sub-nodes of this node.
 String statementToString()
           
 String toString()
          Convert this object to a String.
 
Methods inherited from class com.akiban.sql.parser.DDLStatementNode
getFullName, getObjectName, getRelativeName, init, initAndCheck, isAtomic
 
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, 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
 
Methods inherited from interface com.akiban.sql.parser.IndexDefinition
getObjectName
 

Constructor Detail

CreateIndexNode

public CreateIndexNode()
Method Detail

init

public void init(Object unique,
                 Object indexType,
                 Object indexName,
                 Object tableName,
                 Object columnList,
                 Object joinType,
                 Object properties,
                 Object existenceCheck,
                 Object storageLocation)
          throws StandardException
Initializer for a CreateIndexNode

Overrides:
init in class QueryTreeNode
Parameters:
unique - True means it's a unique index
indexType - The type of index
indexName - The name of the index
tableName - The name of the table the index will be on
columnList - A list of columns, in the order they appear in the index.
properties - The optional properties list associated with the index.
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 DDLStatementNode
Throws:
StandardException

toString

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

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

printSubNodes

public void printSubNodes(int depth)
Description copied from class: QueryTreeNode
Print the sub-nodes of this node. Each sub-class of QueryTreeNode is expected to provide its own printSubNodes() method. In each case, it calls super.printSubNodes(), passing along its depth, to get the sub-nodes of the super-class. Then it prints its own sub-nodes by calling treePrint() on each of its members that is a type of QueryTreeNode. In each case where it calls treePrint(), it should pass "depth + 1" to indicate that the sub-node should be indented one more level when printing. Also, it should call printLabel() to print the name of each sub-node before calling treePrint() on the sub-node, so that the reader of the printed tree can tell what the sub-node is.

Overrides:
printSubNodes in class QueryTreeNode
Parameters:
depth - The depth to indent the sub-nodes

statementToString

public String statementToString()
Specified by:
statementToString in class StatementNode

getUniqueness

public boolean getUniqueness()
Specified by:
getUniqueness in interface IndexDefinition

getIndexType

public String getIndexType()

getIndexName

public TableName getIndexName()

getColumnList

public IndexColumnList getColumnList()

getIndexColumnList

public IndexColumnList getIndexColumnList()
Specified by:
getIndexColumnList in interface IndexDefinition

getJoinType

public JoinNode.JoinType getJoinType()
Specified by:
getJoinType in interface IndexDefinition

getProperties

public Properties getProperties()

getIndexTableName

public TableName getIndexTableName()

getExistenceCheck

public ExistenceCheck getExistenceCheck()

getStorageLocation

public StorageLocation getStorageLocation()


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