com.akiban.sql.parser
Class AlterTableNode

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.AlterTableNode
All Implemented Interfaces:
Visitable

public class AlterTableNode
extends DDLStatementNode

A AlterTableNode represents a DDL statement that alters a table. It contains the name of the object to be created.


Field Summary
 int behavior
           
 boolean compressTable
           
 boolean defragment
           
 boolean purge
           
 boolean sequential
           
 TableElementList tableElementList
           
 boolean truncateEndOfTable
           
 
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
AlterTableNode()
           
 
Method Summary
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 int getChangeType()
           
 String getIndexNameForUpdateStatistics()
           
 void init(Object objectName)
          Initializer for a TRUNCATE TABLE
 void init(Object objectName, Object sequential)
          Initializer for a AlterTableNode for COMPRESS using temporary tables rather than inplace compress
 void init(Object objectName, Object updateStatisticsAll, Object indexName)
          Initializer for a AlterTableNode for updating the statistics.
 void init(Object objectName, Object purge, Object defragment, Object truncateEndOfTable)
          Initializer for a AlterTableNode for INPLACE COMPRESS
 void init(Object objectName, Object tableElementList, Object lockGranularity, Object changeType, Object behavior)
          Initializer for a AlterTableNode
 boolean isCompressTable()
           
 boolean isTruncateTable()
           
 boolean isUpdateStatistics()
           
 boolean isUpdateStatisticsAll()
           
 void printSubNodes(int depth)
          Prints the sub-nodes of this object.
 String statementToString()
           
 String toString()
          Convert this object to a String.
 
Methods inherited from class com.akiban.sql.parser.DDLStatementNode
getFullName, getObjectName, getRelativeName, 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, 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
 

Field Detail

tableElementList

public TableElementList tableElementList

compressTable

public boolean compressTable

sequential

public boolean sequential

purge

public boolean purge

defragment

public boolean defragment

truncateEndOfTable

public boolean truncateEndOfTable

behavior

public int behavior
Constructor Detail

AlterTableNode

public AlterTableNode()
Method Detail

init

public void init(Object objectName)
          throws StandardException
Initializer for a TRUNCATE TABLE

Overrides:
init in class DDLStatementNode
Parameters:
objectName - The name of the table being truncated
Throws:
StandardException - Thrown on error

init

public void init(Object objectName,
                 Object updateStatisticsAll,
                 Object indexName)
          throws StandardException
Initializer for a AlterTableNode for updating the statistics. The user can ask for update statistic of all the indexes or only a specific index

Overrides:
init in class QueryTreeNode
Parameters:
objectName - The name of the table whose index(es) will have their statistics updated.
updateStatisticsAll - If true then update the statistics of all the indexes on the table. If false, then update the statistics of only the index provided as 3rd parameter here
indexName - Only used if updateStatisticsAll is set to false.
Throws:
StandardException - Thrown on error

init

public void init(Object objectName,
                 Object sequential)
          throws StandardException
Initializer for a AlterTableNode for COMPRESS using temporary tables rather than inplace compress

Overrides:
init in class QueryTreeNode
Parameters:
objectName - The name of the table being altered
sequential - Whether or not the COMPRESS is SEQUENTIAL
Throws:
StandardException - Thrown on error

init

public void init(Object objectName,
                 Object purge,
                 Object defragment,
                 Object truncateEndOfTable)
          throws StandardException
Initializer for a AlterTableNode for INPLACE COMPRESS

Overrides:
init in class QueryTreeNode
Parameters:
objectName - The name of the table being altered
purge - PURGE during INPLACE COMPRESS?
defragment - DEFRAGMENT during INPLACE COMPRESS?
truncateEndOfTable - TRUNCATE END during INPLACE COMPRESS?
Throws:
StandardException - Thrown on error

init

public void init(Object objectName,
                 Object tableElementList,
                 Object lockGranularity,
                 Object changeType,
                 Object behavior)
          throws StandardException
Initializer for a AlterTableNode

Overrides:
init in class QueryTreeNode
Parameters:
objectName - The name of the table being altered
tableElementList - The alter table action
lockGranularity - The new lock granularity, if any
changeType - ADD_TYPE or DROP_TYPE
behavior - If drop column is CASCADE or RESTRICTED
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)
Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.

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

statementToString

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

isUpdateStatistics

public boolean isUpdateStatistics()

isUpdateStatisticsAll

public boolean isUpdateStatisticsAll()

getIndexNameForUpdateStatistics

public String getIndexNameForUpdateStatistics()

isCompressTable

public boolean isCompressTable()

isTruncateTable

public boolean isTruncateTable()

getChangeType

public int getChangeType()


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