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

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


    }
    throw new Error("Missing return statement in function");
  }

  final public ResultColumnList uniqueColumnList() throws ParseException, StandardException {
        ResultColumnList        resultColumns = (ResultColumnList) nodeFactory.getNode(
                                                                                        C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                        getContextManager());
    columnNameList(resultColumns);
                {if (true) return resultColumns;}
    throw new Error("Missing return statement in function");
View Full Code Here


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

  final public ConstraintDefinitionNode referentialConstraintDefinition(TableName constraintName) throws ParseException, StandardException {
        ResultColumnList fkRcl = (ResultColumnList) nodeFactory.getNode(
                                                                                C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                getContextManager());
        ResultColumnList refRcl = (ResultColumnList) nodeFactory.getNode(
                                                                                C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                getContextManager());
        TableName referencedTable;
        int[] refActions = {StatementType.RA_NOACTION,
                            StatementType.RA_NOACTION};
View Full Code Here

                                 DataTypeDescriptor dataTypeDescriptor,
                                 String columnName) throws ParseException, StandardException {
        int constraintType;
        Properties properties = null;
        ConstraintDefinitionNode tcdn;
        ResultColumnList refRcl = (ResultColumnList) nodeFactory.getNode(
                                                                                C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                getContextManager());
        TableName referencedTable;
        int[] refActions = {StatementType.RA_NOACTION,
                            StatementType.RA_NOACTION} ;
    switch (jj_nt.kind) {
    case NOT:
      jj_consume_token(NOT);
      jj_consume_token(NULL);
                //if column is explicitly defined not nullable, set following flag
                explicitNotNull = true;
                //if both null and not null constraints are defined for a column,
                //throw an exception
                if (explicitNull)
                   {if (true) throw StandardException.newException(SQLState.LANG_ADDING_COLUMN_WITH_NULL_AND_NOT_NULL_CONSTRAINT, columnName);}
                dataTypeDescriptor.setNullability(false);
                {if (true) return null;}
      break;
    case PRIMARY:
    case UNIQUE:
      //pass the columnname as the second parameter. It will be used to throw an
              //exception if null constraint is defined for this column-level primary
              //key constraint
              constraintType = uniqueSpecification(dataTypeDescriptor,columnName);
      switch (jj_nt.kind) {
      case DERBYDASHPROPERTIES:
        properties = propertyList(false);
        jj_consume_token(CHECK_PROPERTIES);
        break;
      default:
        jj_la1[279] = jj_gen;
        ;
      }
                ResultColumnList uniqueColumnList =
                                                                                (ResultColumnList) nodeFactory.getNode(
                                                                                                C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                                getContextManager());
                uniqueColumnList.addElement(
                        (ResultColumn) nodeFactory.getNode(
                                                        C_NodeTypes.RESULT_COLUMN,
                                                        columnName,
                                                        null,
                                                        getContextManager()));

                {if (true) return (ConstraintDefinitionNode) nodeFactory.getNode(
                                                C_NodeTypes.CONSTRAINT_DEFINITION_NODE,
                                                constraintName,
                                                ReuseFactory.getInteger(constraintType),
                                                uniqueColumnList,
                                                properties,
                                                null,
                                                null,
                                                getContextManager()
                                                );}
      break;
    case REFERENCES:
      referencedTable = referencesSpecification(refRcl, refActions);
      switch (jj_nt.kind) {
      case DERBYDASHPROPERTIES:
        properties = propertyList(false);
        jj_consume_token(CHECK_PROPERTIES);
        break;
      default:
        jj_la1[280] = jj_gen;
        ;
      }
                ResultColumnList fkRcl = (ResultColumnList) nodeFactory.getNode(
                                                                                        C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                        getContextManager());
                fkRcl.addElement(
                                        (ResultColumn) nodeFactory.getNode(
                                                                        C_NodeTypes.RESULT_COLUMN,
                                                                        columnName,
                                                                        null,
                                                                        getContextManager())
View Full Code Here

/*
* <A NAME="tableAction">tableAction</A>
*/
  final public void tableAction(TablePrivilegesNode tablePrivilegesNode) throws ParseException, StandardException {
    ResultColumnList columnList = null;
    switch (jj_nt.kind) {
    case SELECT:
      jj_consume_token(SELECT);
      switch (jj_nt.kind) {
      case LEFT_PAREN:
View Full Code Here

/*
* <A NAME="privilegeColumnList">privilegeColumnList</A>
*/
  final public ResultColumnList privilegeColumnList() throws ParseException, StandardException {
    ResultColumnList cl = (ResultColumnList) nodeFactory.getNode( C_NodeTypes.RESULT_COLUMN_LIST,
                                                                  getContextManager());
    jj_consume_token(LEFT_PAREN);
    columnNameList(cl);
    jj_consume_token(RIGHT_PAREN);
        {if (true) return cl;}
View Full Code Here

    }
    throw new Error("Missing return statement in function");
  }

  final public StatementNode updateBody() throws ParseException, StandardException {
        ResultColumnList        columnList;
        String                          correlationName = null;
        JavaToSQLValueNode      javaToSQLNode = null;
        TableName  tableName = null;
        ValueNode  whereClause = null;
        FromTable  fromTable = null;
View Full Code Here

      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);}
                }
View Full Code Here

/*
* <A NAME="querySpecification">querySpecification</A>
*/
  final public ResultSetNode querySpecification() throws ParseException, StandardException {
        ResultColumnList        selectList;
        SelectNode                      selectNode;
        boolean isDistinct = false;
    jj_consume_token(SELECT);
    if (jj_2_16(1)) {
      isDistinct = setQuantifier();
View Full Code Here

/*
* <A NAME="selectList">selectList</A>
*/
  final public ResultColumnList selectList() throws ParseException, StandardException {
        ResultColumn    allResultColumn;
        ResultColumnList        resultColumns = (ResultColumnList) nodeFactory.getNode(
                                                                        C_NodeTypes.RESULT_COLUMN_LIST,
                                                                        getContextManager());
    switch (jj_nt.kind) {
    case ASTERISK:
      jj_consume_token(ASTERISK);
                allResultColumn = (ResultColumn) nodeFactory.getNode(
                                                                                C_NodeTypes.ALL_RESULT_COLUMN,
                                                                                null,
                                                                                getContextManager());
                /* Add the new AllResultColumn to the end of the list */
                resultColumns.addResultColumn(allResultColumn);
                {if (true) return resultColumns;}
      break;
    default:
      jj_la1[90] = jj_gen;
      if (jj_2_17(1)) {
View Full Code Here

/*
* <A NAME="setClauseList">setClauseList</A>
*/
  final public ResultColumnList setClauseList() throws ParseException, StandardException {
        ResultColumnList        columnList = (ResultColumnList) nodeFactory.getNode(
                                                                                                C_NodeTypes.RESULT_COLUMN_LIST,
                                                                                                getContextManager());
    setClause(columnList);
    label_21:
    while (true) {
View Full Code Here

TOP

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

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.