Package org.apache.derby.impl.sql.compile

Examples of org.apache.derby.impl.sql.compile.QueryTreeNode


** interchangeably in the parser.  The tree has
** aggregate nodes.
*/
  final public ValueNode windowOrAggregateFunctionNode() throws ParseException, StandardException {
        ValueNode winOrAgg;
        QueryTreeNode window = null;
    switch (jj_nt.kind) {
    case COUNT:
      jj_consume_token(COUNT);
      jj_consume_token(LEFT_PAREN);
      switch (jj_nt.kind) {
View Full Code Here


        Token                           checkTok = null;
        Token                           endToken;
        int                                     actionBegin;
        int                                     actionEnd;
        int                                     triggerEvent;
        QueryTreeNode           actionNode;
        ResultColumnList        triggerColumns = (ResultColumnList) nodeFactory.getNode(
                                                                                        C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                        getContextManager());
        Vector                          refClause = null;
    jj_consume_token(TRIGGER);
    triggerName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    isBefore = beforeOrAfter();
    triggerEvent = triggerEvent(triggerColumns);
    jj_consume_token(ON);
    tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    switch (jj_nt.kind) {
    case REFERENCING:
      refClause = triggerReferencingClause();
      break;
    default:
      jj_la1[253] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case FOR:
      jj_consume_token(FOR);
      jj_consume_token(EACH);
      isRow = rowOrStatement();
      break;
    default:
      jj_la1[254] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case MODE:
      jj_consume_token(MODE);
      jj_consume_token(DB2SQL);
      break;
    default:
      jj_la1[255] = jj_gen;
      ;
    }
    //we are not top level statement
                    actionNode = proceduralStatement(tokenHolder);
                actionEnd = getToken(0).endOffset;
                actionBegin = tokenHolder[0].beginOffset;

                // No DML in action node for BEFORE triggers.
                if (isBefore.booleanValue() && (actionNode instanceof DMLModStatementNode)) {
                                {if (true) throw StandardException.newException(
                                        SQLState.LANG_UNSUPPORTED_TRIGGER_STMT,
                                        ((StatementNode) actionNode).statementToString(), "BEFORE");}
                                        }


                // no params in trigger action
                HasNodeVisitor visitor = new HasNodeVisitor(ParameterNode.class);
                actionNode.accept(visitor);
                if (visitor.hasNode())
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_NO_PARAMS_IN_TRIGGER_ACTION);}
                }
View Full Code Here

/*
* <A NAME="newInvocation">newInvocation</A>
*/
  final public JavaToSQLValueNode newInvocation() throws ParseException, StandardException {
        QueryTreeNode   newNode;
        Vector  parameterList = new Vector();
        String  javaClassName;
    jj_consume_token(NEW);
    javaClassName = javaClassName();
    methodCallParameterList(parameterList);
View Full Code Here

*
* Note that this latter syntax is still supported.
*/
  final public JavaToSQLValueNode vtiTableConstruct() throws ParseException, StandardException {
    NewInvocationNode newNode = null;
    QueryTreeNode invocationNode = null;
    Vector parameterList = new Vector();
    TableName vtiTableName = null;
    TableDescriptor td;
    MethodCallNode      methodNode;
    jj_consume_token(TABLE);
View Full Code Here

        Token                           checkTok = null;
        Token                           endToken;
        int                                     actionBegin;
        int                                     actionEnd;
        int                                     triggerEvent;
        QueryTreeNode           actionNode;
        ResultColumnList        triggerColumns = (ResultColumnList) nodeFactory.getNode(
                                                                                        C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                        getContextManager());
        Vector                          refClause = null;
    jj_consume_token(TRIGGER);
    triggerName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    isBefore = beforeOrAfter();
    triggerEvent = triggerEvent(triggerColumns);
    jj_consume_token(ON);
    tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    switch (jj_nt.kind) {
    case REFERENCING:
      refClause = triggerReferencingClause();
      break;
    default:
      jj_la1[229] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case FOR:
      jj_consume_token(FOR);
      jj_consume_token(EACH);
      isRow = rowOrStatement();
      break;
    default:
      jj_la1[230] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case MODE:
      jj_consume_token(MODE);
      jj_consume_token(DB2SQL);
      break;
    default:
      jj_la1[231] = jj_gen;
      ;
    }
    //we are not top level statement
                    actionNode = proceduralStatement(tokenHolder);
                actionEnd = getToken(0).endOffset;
                actionBegin = tokenHolder[0].beginOffset;

                // No DML in action node for BEFORE triggers.
                if (isBefore.booleanValue() && (actionNode instanceof DMLModStatementNode)) {
                                {if (true) throw StandardException.newException(
                                        SQLState.LANG_UNSUPPORTED_TRIGGER_STMT,
                                        ((StatementNode) actionNode).statementToString(), "BEFORE");}
                                        }


                // no params in trigger action
                HasNodeVisitor visitor = new HasNodeVisitor(ParameterNode.class);
                actionNode.accept(visitor);
                if (visitor.hasNode())
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_NO_PARAMS_IN_TRIGGER_ACTION);}
                }
View Full Code Here

        JavaToSQLValueNode      javaToSQLNode = null;
        String                          correlationName = null;
        TableName  tableName = null;
        ValueNode  whereClause = null;
        FromTable  fromTable = null;
        QueryTreeNode retval;
        Properties targetProperties = null;
        Token      whereToken = null;
    if (fromNewInvocationFollows()) {
      jj_consume_token(FROM);
      javaToSQLNode = newInvocation();
View Full Code Here

/*
* <A NAME="insertStatement">insertStatement</A>
*/
  final public StatementNode insertStatement() throws ParseException, StandardException {
        StatementNode   insertNode;
        QueryTreeNode   targetTable;
    jj_consume_token(INSERT);
    jj_consume_token(INTO);
    targetTable = targetTable();
    insertNode = insertColumnsAndSource(targetTable);
                setUpAndLinkParameters();
View Full Code Here

        JavaToSQLValueNode      javaToSQLNode = null;
        String                          correlationName = null;
        TableName  tableName = null;
        ValueNode  whereClause = null;
        FromTable  fromTable = null;
        QueryTreeNode retval;
        Properties targetProperties = null;
        Token      whereToken = null;
    if (fromNewInvocationFollows()) {
      jj_consume_token(FROM);
      javaToSQLNode = newInvocation();
View Full Code Here

/*
* <A NAME="insertStatement">insertStatement</A>
*/
  final public StatementNode insertStatement() throws ParseException, StandardException {
        StatementNode   insertNode;
        QueryTreeNode   targetTable;
    jj_consume_token(INSERT);
    jj_consume_token(INTO);
    targetTable = targetTable();
    insertNode = insertColumnsAndSource(targetTable);
                setUpAndLinkParameters();
View Full Code Here

/*
* <A NAME="newInvocation">newInvocation</A>
*/
  final public JavaToSQLValueNode newInvocation() throws ParseException, StandardException {
        QueryTreeNode   newNode;
        Vector  parameterList = new Vector();
        String  javaClassName;
    jj_consume_token(NEW);
    javaClassName = javaClassName();
    methodCallParameterList(parameterList);
View Full Code Here

TOP

Related Classes of org.apache.derby.impl.sql.compile.QueryTreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.