com.akiban.sql.parser
Class DDLStatementNode

java.lang.Object
  extended by com.akiban.sql.parser.QueryTreeNode
      extended by com.akiban.sql.parser.StatementNode
          extended by com.akiban.sql.parser.DDLStatementNode
All Implemented Interfaces:
Visitable
Direct Known Subclasses:
AlterTableNode, CreateAliasNode, CreateIndexNode, CreateRoleNode, CreateSchemaNode, CreateSequenceNode, CreateTableNode, CreateTriggerNode, CreateViewNode, DropAliasNode, DropGroupNode, DropIndexNode, DropRoleNode, DropSchemaNode, DropSequenceNode, DropTableNode, DropTriggerNode, DropViewNode, GrantNode, GrantRoleNode, RenameNode, RevokeNode, RevokeRoleNode, SavepointNode

public abstract class DDLStatementNode
extends StatementNode

A DDLStatementNode represents any type of DDL statement: CREATE TABLE, CREATE INDEX, ALTER TABLE, etc.


Field Summary
static int ADD_TYPE
           
static int DROP_TYPE
           
static int LOCKING_TYPE
           
static int MODIFY_TYPE
           
static int 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
DDLStatementNode()
           
 
Method Summary
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 String getFullName()
          Return the full dot expression name of the object being dropped.
 TableName getObjectName()
           
 String getRelativeName()
          Return the name of the table being dropped.
 void init(Object objectName)
          Initialize a query tree node.
protected  void initAndCheck(Object objectName)
          Initialize the object name we will be performing the DDL on and check that we are not in the system schema and that DDL is allowed.
 boolean isAtomic()
          A DDL statement is always atomic
 String toString()
          Convert this object to a String.
 
Methods inherited from class com.akiban.sql.parser.StatementNode
statementToString
 
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, init, isInstanceOf, makeTableName, makeTableName, nodeHeader, printLabel, printSubNodes, 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

UNKNOWN_TYPE

public static final int UNKNOWN_TYPE
See Also:
Constant Field Values

ADD_TYPE

public static final int ADD_TYPE
See Also:
Constant Field Values

DROP_TYPE

public static final int DROP_TYPE
See Also:
Constant Field Values

MODIFY_TYPE

public static final int MODIFY_TYPE
See Also:
Constant Field Values

LOCKING_TYPE

public static final int LOCKING_TYPE
See Also:
Constant Field Values
Constructor Detail

DDLStatementNode

public DDLStatementNode()
Method Detail

init

public void init(Object objectName)
          throws StandardException
Description copied from class: QueryTreeNode
Initialize a query tree node.

Overrides:
init in class QueryTreeNode
Throws:
StandardException - Thrown on error

initAndCheck

protected void initAndCheck(Object objectName)
                     throws StandardException
Initialize the object name we will be performing the DDL on and check that we are not in the system schema and that DDL is allowed.

Throws:
StandardException

copyFrom

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

Overrides:
copyFrom in class QueryTreeNode
Throws:
StandardException

isAtomic

public boolean isAtomic()
A DDL statement is always atomic

Returns:
true

getRelativeName

public String getRelativeName()
Return the name of the table being dropped. This is the unqualified table name.

Returns:
the relative name

getFullName

public String getFullName()
Return the full dot expression name of the object being dropped.

Returns:
the full name

getObjectName

public final TableName getObjectName()

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 StatementNode
Returns:
This object as a String


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