Examples of QueryTreeNode


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

*   SELECT * FROM NEW org.apache.derby.diag.SpaceTable('APP', 'T1')) x
*
* Note that this latter syntax is still supported.
*/
  final public JavaToSQLValueNode vtiTableConstruct() throws ParseException, StandardException {
    QueryTreeNode newNode = null;
    Vector parameterList = new Vector();
    TableName vtiTableName = null;
    jj_consume_token(TABLE);
    jj_consume_token(LEFT_PAREN);
    vtiTableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
View Full Code Here

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

        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[226] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case FOR:
      jj_consume_token(FOR);
      jj_consume_token(EACH);
      isRow = rowOrStatement();
      break;
    default:
      jj_la1[227] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case MODE:
      jj_consume_token(MODE);
      jj_consume_token(DB2SQL);
      break;
    default:
      jj_la1[228] = 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

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

        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

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

/*
* <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

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

/*
* <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

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

*   SELECT * FROM NEW org.apache.derby.diag.SpaceTable('APP', 'T1')) x
*
* Note that this latter syntax is still supported.
*/
  final public JavaToSQLValueNode vtiTableConstruct() throws ParseException, StandardException {
    QueryTreeNode newNode = null;
    Vector parameterList = new Vector();
    TableName vtiTableName = null;
    jj_consume_token(TABLE);
    jj_consume_token(LEFT_PAREN);
    vtiTableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
View Full Code Here

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

        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[226] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case FOR:
      jj_consume_token(FOR);
      jj_consume_token(EACH);
      isRow = rowOrStatement();
      break;
    default:
      jj_la1[227] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case MODE:
      jj_consume_token(MODE);
      jj_consume_token(DB2SQL);
      break;
    default:
      jj_la1[228] = 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

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

        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

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

/*
* <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

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

/*
* <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
Copyright © 2018 www.massapi.com. 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.