com.akiban.sql.parser
Class CreateTriggerNode

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

public class CreateTriggerNode
extends DDLStatementNode

A CreateTriggerNode is the root of a QueryTree that represents a CREATE TRIGGER statement.


Field Summary
static int TRIGGER_EVENT_DELETE
           
static int TRIGGER_EVENT_INSERT
           
static int TRIGGER_EVENT_UPDATE
           
 
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
CreateTriggerNode()
           
 
Method Summary
 void copyFrom(QueryTreeNode node)
          Fill this node with a deep copy of the given node.
 void init(Object triggerName, Object tableName, Object triggerEventMask, Object triggerCols, Object isBefore, Object isRow, Object isEnabled, Object refClause, Object whenClause, Object whenText, Object whenOffset, Object actionNode, Object actionText, Object actionOffset)
          Initializer for a CreateTriggerNode
 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, 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
 

Field Detail

TRIGGER_EVENT_UPDATE

public static final int TRIGGER_EVENT_UPDATE
See Also:
Constant Field Values

TRIGGER_EVENT_DELETE

public static final int TRIGGER_EVENT_DELETE
See Also:
Constant Field Values

TRIGGER_EVENT_INSERT

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

CreateTriggerNode

public CreateTriggerNode()
Method Detail

init

public void init(Object triggerName,
                 Object tableName,
                 Object triggerEventMask,
                 Object triggerCols,
                 Object isBefore,
                 Object isRow,
                 Object isEnabled,
                 Object refClause,
                 Object whenClause,
                 Object whenText,
                 Object whenOffset,
                 Object actionNode,
                 Object actionText,
                 Object actionOffset)
          throws StandardException
Initializer for a CreateTriggerNode

Overrides:
init in class QueryTreeNode
Parameters:
triggerName - name of the trigger
tableName - name of the table which the trigger is declared upon
triggerEventMask - TRIGGER_EVENT_XXX
triggerCols - columns trigger is to fire upon. Valid for UPDATE case only.
isBefore - is before trigger (false for after)
isRow - true for row trigger, false for statement
isEnabled - true if enabled
refClause - the referencing clause
whenClause - the WHEN clause tree
whenText - the text of the WHEN clause
whenOffset - offset of start of WHEN clause
actionNode - the trigger action tree
actionText - the text of the trigger action
actionOffset - offset of start of action clause
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

statementToString

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

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 of this node in the tree

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


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