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

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


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


  final public TableOperatorNode qualifiedJoin(ResultSetNode leftRSN, boolean nestedInParens) throws ParseException, StandardException {
        int                                     joinType = JoinNode.INNERJOIN;
        ResultSetNode           rightRSN;
        TableOperatorNode       ton = null;
        Object[]                        onOrUsingClause = null;
        ResultColumnList        usingClause = null;
        ValueNode                       onClause;
    switch (jj_nt.kind) {
    case INNER:
    case LEFT:
    case RIGHT:
View Full Code Here

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

  final public Object[] joinSpecification(ResultSetNode leftRSN, ResultSetNode rightRSN) throws ParseException, StandardException {
        Object[]                        onOrUsingClause = new Object[ON_OR_USING_CLAUSE_SIZE];
        ResultColumnList        usingClause = null;
        ValueNode                       joinClause = null;
    joinClause = joinCondition();
                onOrUsingClause[ON_CLAUSE] = joinClause;
                onOrUsingClause[USING_CLAUSE] = usingClause;
                {if (true) return onOrUsingClause;}
View Full Code Here

  final public StatementNode tableDefinition() throws ParseException, StandardException {
        char                            lockGranularity = TableDescriptor.DEFAULT_LOCK_GRANULARITY;
        Properties                      properties = null;
        TableName                       tableName;
        TableElementList        tableElementList;
        ResultColumnList        resultColumns = null;
        ResultSetNode           queryExpression;
        boolean                         withData = true;
    jj_consume_token(TABLE);
    tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    if (getToken(1).kind == LEFT_PAREN &&
View Full Code Here

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

  final public ResultColumnList tableColumnList() 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

                list[2].addElement(ReuseFactory.getInteger(JDBC30Translation.PARAMETER_MODE_IN));
  }

  final public StatementNode viewDefinition(Token beginToken) throws ParseException, StandardException {
        int                                     checkOptionType;
        ResultColumnList        resultColumns = null;
        ResultSetNode           queryExpression;
        TableName                       tableName;
        Token                           checkTok = null;
        Token                           endToken;
    jj_consume_token(VIEW);
View Full Code Here

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

  final public ResultColumnList viewColumnList() 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

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

*/
  final public ConstraintDefinitionNode checkConstraintDefinition(TableName constraintName, String columnName) throws ParseException, StandardException {
        Token           beginToken;
        Token           endToken;
        ValueNode       value;
        ResultColumnList rclList = null;
    jj_consume_token(CHECK);
    beginToken = jj_consume_token(LEFT_PAREN);
    value = valueExpression(false);
    endToken = jj_consume_token(RIGHT_PAREN);
                if (columnName != null)
                {
                        /* Column check constraint */
                        rclList = (ResultColumnList) nodeFactory.getNode(
                                                                        C_NodeTypes.RESULT_COLUMN_LIST,
                                                                        getContextManager());
                        rclList.addElement((ResultColumn) nodeFactory.getNode(
                                                                        C_NodeTypes.RESULT_COLUMN,
                                                                        columnName,
                                                                        null,
                                                                        getContextManager()));
                }
View Full Code Here

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

  final public ConstraintDefinitionNode uniqueConstraintDefinition(TableName constraintName) throws ParseException, StandardException {
        int constraintType;
        ResultColumnList uniqueColumnList;
    //for table level constraint, second parameter will be null
            constraintType = uniqueSpecification((DataTypeDescriptor) null, null);
    jj_consume_token(LEFT_PAREN);
    uniqueColumnList = uniqueColumnList();
    jj_consume_token(RIGHT_PAREN);
                //go through the unique columns list and if any of the columns in the
                //list is explicitly defined null, throw an exception for this. Columns
                //for which no nullability is defined are by default nullable. But in
                //case of create table, there nullability changes automatically to
                //non-nullable if primary key is defined on it. But if user explicitly
                //defines the nullability, then defining a primary key on it in create
                //table will result in an exception.
                if (constraintType ==  DataDictionary.PRIMARYKEY_CONSTRAINT)
                {
                        for (int index = 0; index < uniqueColumnList.size(); index++)
                        {
                                String primaryKeyColumnName = ((ResultColumn) uniqueColumnList.elementAt(index)).getName();
                                if (explicitlyNullableColumnsList.contains(primaryKeyColumnName))
                                {
                                        String errorState = SQLState.LANG_DB2_ADD_UNIQUE_OR_PRIMARY_KEY_ON_NULL_COLS;
                                        {if (true) throw StandardException.newException(errorState, primaryKeyColumnName);}
                                }
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.