Package com.akiban.sql.types

Examples of com.akiban.sql.types.DataTypeDescriptor


    /* Remember the last token we got that was an identifier. */
    private Token lastIdentifierToken, nextToLastIdentifierToken;

    private DataTypeDescriptor getType(int type, int precision, int scale, int length)
            throws StandardException {
        return new DataTypeDescriptor(TypeId.getBuiltInTypeId(type),
                                      precision,
                                      scale,
                                      true, /* assume nullable for now, change it if not nullable */
                                      length);
    }
View Full Code Here


                                      length);
    }

    private DataTypeDescriptor getJavaClassDataTypeDescriptor(TableName typeName)
            throws StandardException {
        return new DataTypeDescriptor(TypeId.getUserDefinedTypeId(typeName.getSchemaName(),
                                                                  typeName.getTableName(),
                                                                  null),
                                      true);
    }
View Full Code Here

      defaultNode = defaultAndConstraints(typeDescriptor, tableElementList, columnName,
                                                autoIncrementInfo);
      switch (jj_nt.kind) {
      case COLLATE:
        collation = collateClause();
                                      typeDescriptor[0] = new DataTypeDescriptor(typeDescriptor[0], CharacterTypeAttributes.forCollation(null, collation));
        break;
      default:
        jj_la1[39] = jj_gen;
        ;
      }
View Full Code Here

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

  final public DataTypeDescriptor dataTypeDDL() throws ParseException, StandardException {
    DataTypeDescriptor typeDescriptor;
    if (commonDatatypeName(false)) {
      typeDescriptor = dataTypeCommon();
        {if (true) return typeDescriptor;}
    } else if (getToken(1).kind != GENERATED) {
      typeDescriptor = javaType();
View Full Code Here

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

  final public DataTypeDescriptor catalogType() throws ParseException, StandardException {
    DataTypeDescriptor typeDescriptor;
    typeDescriptor = dataTypeDDL();
        {if (true) return typeDescriptor;}          // NOTE: Used to be .getCatalogType()

    throw new Error("Missing return statement in function");
  }
View Full Code Here

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

  final public DataTypeDescriptor dataTypeCast() throws ParseException, StandardException {
    DataTypeDescriptor typeDescriptor;
    if (commonDatatypeName(true)) {
      typeDescriptor = dataTypeCommon();
        {if (true) return typeDescriptor;}
    } else if (jj_2_23(1)) {
      typeDescriptor = javaType();
View Full Code Here

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

  final public DataTypeDescriptor dataTypeCommon() throws ParseException, StandardException {
    DataTypeDescriptor typeDescriptor;
    boolean checkCS = false;
    CharacterTypeAttributes characterAttributes = null;
    if (jj_2_24(1)) {
      if (getToken(2).kind != LARGE) {

      } else {
        jj_consume_token(-1);
        throw new ParseException();
      }
      typeDescriptor = characterStringType();
      characterAttributes = characterTypeAttributes();
    } else if (jj_2_25(1)) {
      if (getToken(3).kind != LARGE) {

      } else {
        jj_consume_token(-1);
        throw new ParseException();
      }
      typeDescriptor = nationalCharacterStringType();
      characterAttributes = characterTypeAttributes();
    } else if (jj_2_26(1)) {
      typeDescriptor = numericType();
    } else {
      switch (jj_nt.kind) {
      case YEAR:
      case DATE:
      case DATETIME:
      case TIME:
      case TIMESTAMP:
        typeDescriptor = datetimeType();
        break;
      case INTERVAL:
        typeDescriptor = intervalType();
        break;
      case BOOLEAN:
        jj_consume_token(BOOLEAN);
        typeDescriptor = new DataTypeDescriptor(TypeId.BOOLEAN_ID, true);
        break;
      case LONG:
        typeDescriptor = longType();
        break;
      case BINARY:
      case CHAR:
      case CHARACTER:
      case NATIONAL:
      case BLOB:
      case CLOB:
      case NCLOB:
      case LONGBLOB:
      case LONGTEXT:
      case MEDIUMBLOB:
      case MEDIUMTEXT:
      case TEXT:
      case TINYBLOB:
      case TINYTEXT:
        typeDescriptor = LOBType();
        break;
      case XML:
        typeDescriptor = XMLType();
        break;
      default:
        jj_la1[42] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
        if (characterAttributes != null)
            typeDescriptor = new DataTypeDescriptor(typeDescriptor, characterAttributes);
        {if (true) return typeDescriptor;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

      break;
    default:
      jj_la1[46] = jj_gen;
      ;
    }
        DataTypeDescriptor charDTD = DataTypeDescriptor.getBuiltInDataTypeDescriptor(type, length);
        {if (true) return charDTD;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

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

  final public DataTypeDescriptor nationalCharacterStringType() throws ParseException, StandardException {
    DataTypeDescriptor  dataTypeDescriptor;
    int length = DEFAULT_STRING_COLUMN_LENGTH;
    String type = null;
    Token varyingToken = null;
    switch (jj_nt.kind) {
    case NATIONAL:
View Full Code Here

      jj_la1[66] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    characterAttributes = characterTypeAttributes();
        DataTypeDescriptor dtd = DataTypeDescriptor.getBuiltInDataTypeDescriptor(type, length);
        if (characterAttributes != null)
            dtd = new DataTypeDescriptor(dtd, characterAttributes);
        {if (true) return dtd;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

TOP

Related Classes of com.akiban.sql.types.DataTypeDescriptor

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.