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

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


* <A NAME="indexDefinition">indexDefinition</A>
*/
  final public StatementNode indexDefinition() throws ParseException, StandardException {
        Boolean         unique = Boolean.FALSE;
        Properties      properties = null;
        TableName       indexName;
        TableName       tableName;
        Vector  indexColumnList = new Vector();
    switch (jj_nt.kind) {
    case UNIQUE:
      unique = unique();
      break;
    default:
      jj_la1[235] = jj_gen;
      ;
    }
    jj_consume_token(INDEX);
    indexName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    jj_consume_token(ON);
    tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    jj_consume_token(LEFT_PAREN);
    indexColumnList(indexColumnList);
    jj_consume_token(RIGHT_PAREN);
    switch (jj_nt.kind) {
    case DERBYDASHPROPERTIES:
      properties = propertyList(false);
      jj_consume_token(CHECK_PROPERTIES);
      break;
    default:
      jj_la1[236] = jj_gen;
      ;
    }
                /* User allowed to specify schema name on table and index.
     * If no schema name specified for index, then it "inherits"
     * its schema name from the table.
     * If index has a schema name and table does not, then
     * table "inherits" its schema name from the index.
     * If schema names are specified for both objects, then the
     * schema names must be the same.
     */
                if (indexName.getSchemaName() == null)
                {
                        indexName.setSchemaName(tableName.getSchemaName());
                }
                else if (tableName.getSchemaName() == null)
                {
                        tableName.setSchemaName(indexName.getSchemaName());
                }
                else
                {
                        /* schema name specified for both */
                        if (! (indexName.getSchemaName().equals(
                                                tableName.getSchemaName())))
                        {
                                {if (true) throw StandardException.newException(SQLState.LANG_INDEX_AND_TABLE_IN_DIFFERENT_SCHEMAS,
                                                        indexName,
                                                        tableName);}
                        }
View Full Code Here


  6 - Short - SQL allowed.
  7 - Boolean - CALLED ON NULL INPUT (always TRUE for procedures)
  8 - TypeDescriptor - return type (always NULL for procedures)
*/
  final public StatementNode procedureDefinition() throws ParseException, StandardException {
        TableName procedureName;
        Object[] procedureElements = new Object[CreateAliasNode.ROUTINE_ELEMENT_COUNT];
    jj_consume_token(PROCEDURE);
    procedureName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    procedureElements[0] = procedureParameterList();
    label_33:
View Full Code Here

  6 - Short - SQL allowed.
  7 - Boolean - CALLED ON NULL INPUT
  8 - TypeDescriptor - return type
*/
  final public StatementNode functionDefinition() throws ParseException, StandardException {
        TableName functionName;
        TypeDescriptor  returnType;
        Object[] functionElements = new Object[CreateAliasNode.ROUTINE_ELEMENT_COUNT];
    jj_consume_token(FUNCTION);
    functionName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    functionElements[0] = functionParameterList();
View Full Code Here

/**
  CREATE TYPE
*/
  final public StatementNode udtDefinition() throws ParseException, StandardException {
        TableName udtName;
        String externalName;
    jj_consume_token(TYPE);
    udtName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    jj_consume_token(EXTERNAL);
    jj_consume_token(NAME);
View Full Code Here

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

  }

  final public StatementNode triggerDefinition() throws ParseException, StandardException {
        Boolean                         isBefore;
        Boolean                         isRow = Boolean.FALSE;  // STATEMENT implicit by default
        TableName                       tableName;
        TableName                       triggerName;
        Token[]                         tokenHolder = new Token[1];
        Token                           beginToken;
        Token                           checkTok = null;
        Token                           endToken;
        int                                     actionBegin;
View Full Code Here

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

  final public StatementNode synonymDefinition() throws ParseException, StandardException {
        TableName synonymName;
        TableName targetName;
    jj_consume_token(SYNONYM);
    synonymName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    jj_consume_token(FOR);
    targetName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
                checkVersion(DataDictionary.DD_VERSION_DERBY_10_1,
View Full Code Here

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

  final public TableName constraintNameDefinition() throws ParseException, StandardException {
        TableName constraintName;
    jj_consume_token(CONSTRAINT);
    constraintName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
                {if (true) return constraintName;}
    throw new Error("Missing return statement in function");
  }
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);
    newTableName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true);
View Full Code Here

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

  final public StatementNode lockStatement() throws ParseException, StandardException {
        Boolean                                         exclusiveMode;
        TableName                                       tableName;
    jj_consume_token(LOCK);
    jj_consume_token(TABLE);
    tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    jj_consume_token(IN);
    exclusiveMode = lockMode();
View Full Code Here

TOP

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

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.