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

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


                        ! (((JavaToSQLValueNode) value).getJavaValueNode() instanceof MethodCallNode))
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_INVALID_CALL_STATEMENT);}
                }

                StatementNode callStatement =
                                                                        (StatementNode) nodeFactory.getNode(
                                                                                                C_NodeTypes.CALL_STATEMENT_NODE,
                                                                                                value,
                                                                                                getContextManager());

                setUpAndLinkParameters();

                {if (true) return callStatement;}
      break;
    case QUESTION_MARK:
      returnParam = dynamicParameterSpecification();
                getCompilerContext().setReturnParameterFlag(); //bug4450

      jj_consume_token(EQUALS_OPERATOR);
      jj_consume_token(CALL);
      resultSetNode = rowValueConstructor(null);
                // validate that we have something that is an appropriate call statement
                ResultColumnList rcl = resultSetNode.getResultColumns();

                // we can have only 1 return value/column
                if (rcl == null || rcl.size() > 1)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_INVALID_CALL_STATEMENT);}
                }

                // we must have a method call node
                value = ((ResultColumn) rcl.elementAt(0)).getExpression();
                if (! (value instanceof JavaToSQLValueNode) ||
                        ! (((JavaToSQLValueNode) value).getJavaValueNode() instanceof MethodCallNode))
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_INVALID_CALL_STATEMENT);}
                }

                // wrap the row result set in a cursor node
                StatementNode cursorNode =
                                        (StatementNode) nodeFactory.getNode(
                                                C_NodeTypes.CURSOR_NODE,
                                                "SELECT",
                                                resultSetNode,
                                                null,
View Full Code Here


/*
* <A NAME="spsRenameStatement">spsRenameStatement</A>
*/
  final public StatementNode spsRenameStatement() throws ParseException, StandardException {
        StatementNode qtn;
    jj_consume_token(RENAME);
    switch (jj_nt.kind) {
    case TABLE:
      qtn = renameTableStatement();
      break;
View Full Code Here

/*
* <A NAME="renameTableStatement">renameTableStatement</A>
*/
  final public StatementNode renameTableStatement() throws ParseException, StandardException {
        StatementNode qtn;
        TableName tableName;
        String newTableName;
    jj_consume_token(TABLE);
    tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    jj_consume_token(TO);
View Full Code Here

        String newIndexName;
    jj_consume_token(INDEX);
    oldIndexName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true);
    jj_consume_token(TO);
    newIndexName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true);
                StatementNode qtn = (StatementNode) nodeFactory.getNode(
                                                                C_NodeTypes.RENAME_NODE,
                                                                null,
                                                                oldIndexName,
                                                                newIndexName,
                                                                Boolean.FALSE,
View Full Code Here

                {if (true) return value;}
    throw new Error("Missing return statement in function");
  }

  final public StatementNode setSchemaStatement() throws ParseException, StandardException {
        StatementNode setSchema;
    setSchemaHeader();
    switch (jj_nt.kind) {
    case EQUALS_OPERATOR:
      jj_consume_token(EQUALS_OPERATOR);
      break;
View Full Code Here

  final public StatementNode dropSchemaStatement() throws ParseException, StandardException {
        String schemaName;
    jj_consume_token(SCHEMA);
    schemaName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true);
    jj_consume_token(RESTRICT);
                StatementNode stmt =  (StatementNode) nodeFactory.getNode(
                                                        C_NodeTypes.DROP_SCHEMA_NODE,
                                                        schemaName,
                                                        new Integer(StatementType.DROP_RESTRICT),
                                                        getContextManager());
View Full Code Here

                {if (true) return stmt;}
    throw new Error("Missing return statement in function");
  }

  final public StatementNode alterTableStatement() throws ParseException, StandardException {
        StatementNode           node;
        TableName                       tableName;
    jj_consume_token(TABLE);
    tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    node = alterTableBody(tableName);
                {if (true) return node;}
View Full Code Here

                {if (true) return node;}
    throw new Error("Missing return statement in function");
  }

  final public StatementNode alterTableBody(TableName tableName) throws ParseException, StandardException {
        StatementNode qtn;
        char                            lockGranularity = '\0';
        String               newTableName;
        TableElementList        tableElementList =
                                                                        (TableElementList) nodeFactory.getNode(
                                                                                                C_NodeTypes.TABLE_ELEMENT_LIST,
View Full Code Here

/*
* <A NAME="grantStatement">grantStatement</A>
*/
  final public StatementNode grantStatement() throws ParseException, StandardException {
    StatementNode node;
    jj_consume_token(GRANT);
                checkVersion( DataDictionary.DD_VERSION_DERBY_10_2, "GRANT");
                checkSqlStandardAccess( "GRANT");
    switch (jj_nt.kind) {
    case ALL:
View Full Code Here

/*
* <A NAME="revokeStatement">revokeStatement</A>
*/
  final public StatementNode revokeStatement() throws ParseException, StandardException {
    StatementNode node;
    jj_consume_token(REVOKE);
          checkVersion( DataDictionary.DD_VERSION_DERBY_10_2, "REVOKE");
          checkSqlStandardAccess( "REVOKE");
    switch (jj_nt.kind) {
    case ALL:
View Full Code Here

TOP

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

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.