Class SetConstraintsNode

All Implemented Interfaces:
Visitable

class SetConstraintsNode extends MiscellaneousStatementNode
A SetConstraintsNode is the root of a QueryTree that represents a SET CONSTRAINTS statement.
  • Field Details

    • constraints

      private final List<TableName> constraints
      List of strings representing the constraints we want to set. If empty, this means ALL.
    • deferred

      private final boolean deferred
      Encodes IMMEDIATE (false), DEFERRED (true)
  • Constructor Details

    • SetConstraintsNode

      SetConstraintsNode(List<TableName> constraints, boolean deferred, ContextManager cm)
      Parameters:
      constraints - List of strings representing the constraints we want to set (empty means ALL).
      deferred - Encodes IMMEDIATE (false) or DEFERRED (true)
      cm - The context manager
  • Method Details

    • 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
    • formatList

      String formatList(List<TableName> constraints)
    • statementToString

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

      public ConstantAction makeConstantAction() throws StandardException
      Create the Constant information that will drive the guts of Execution.
      Overrides:
      makeConstantAction in class QueryTreeNode
      Throws:
      StandardException - Thrown on failure
    • bindStatement

      public void bindStatement() throws StandardException
      Description copied from class: StatementNode
      Perform the binding operation statement. Binding consists of permissions checking, view resolution, datatype resolution, and creation of a dependency list (for determining whether a tree or plan is still up to date). This bindStatement() method does nothing. Each StatementNode type that can appear at the top of a tree can override this method with its own bindStatement() method that does "something".
      Overrides:
      bindStatement in class StatementNode
      Throws:
      StandardException - Thrown on error
    • acceptChildren

      void acceptChildren(Visitor v) throws StandardException
      Description copied from class: QueryTreeNode
      Accept a visitor on all child nodes. All sub-classes that add fields that should be visited, should override this method and call accept(v) on all visitable fields, as well as super.acceptChildren(v) to make sure all visitable fields defined by the super-class are accepted too.
      Overrides:
      acceptChildren in class QueryTreeNode
      Parameters:
      v - the visitor
      Throws:
      StandardException - on errors raised by the visitor