Package org.apache.derby.iapi.types

Examples of org.apache.derby.iapi.types.DataTypeDescriptor


    for (int index = 0; index < size; index++)
    {
      ResultColumn resultColumn = (ResultColumn) elementAt(index);

      /* dts = resultColumn.getExpression().getTypeServices(); */
      DataTypeDescriptor dts = resultColumn.getTypeServices();

      /* Vectors are 0-based, VirtualColumnIds are 1-based */
      resultColumn.expression = (ValueNode) getNodeFactory().getNode(
              C_NodeTypes.VIRTUAL_COLUMN_NODE,
              sourceResultSet,
View Full Code Here


                                                     thisTypeId.getSQLTypeName(),
                                                     otherTypeId.getSQLTypeName(),
                                                     operatorName);
      }

      DataTypeDescriptor resultType = thisExpr.getTypeServices().getDominantType(
                        otherExpr.getTypeServices(),
                        cf);

      newCR = (ColumnReference) getNodeFactory().getNode(
                    C_NodeTypes.COLUMN_REFERENCE,
View Full Code Here

    int size = size();
    for (int index = 0; index < size; index++)
      {
        ResultColumn  rc = (ResultColumn) elementAt(index);
        ValueNode     expr = rc.getExpression();
        DataTypeDescriptor rcDTS = rc.getTypeServices();
        DataTypeDescriptor exDTS = expr.getTypeServices();

        if (rcDTS == null || exDTS == null)
        {
          isConsistent = false;
          break;
        }

        if (rcDTS.getClass().getName() !=
          exDTS.getClass().getName())
        {
          isConsistent = false;
          break;
        }
      }
View Full Code Here

          maxWidth = 0;
        }

        int precision = cti.isDecimalTypeId() ? rsmd.getPrecision(index) : 0;
        int scale = cti.isDecimalTypeId() ? rsmd.getScale(index) : 0;
        DataTypeDescriptor dts = new DataTypeDescriptor(cti,
                      precision,
                      scale,
                      nullableResult,
                      maxWidth);
        addColumn( tableName, rsmd.getColumnName(index), dts );
View Full Code Here

    ** nullable, the result of the comparison must be nullable, too, so
    ** we can represent the unknown truth value.
    */
    nullableResult = leftOperand.getTypeServices().isNullable() ||
              rightOperandList.isNullable();
    setType(new DataTypeDescriptor(TypeId.BOOLEAN_ID, nullableResult));
  }
View Full Code Here

    /*
    ** The result type of upper()/lower() is the type of the operand.
    */

    setType(new DataTypeDescriptor(operandType,
        operand.getTypeServices().isNullable(),
        operand.getTypeCompiler().
          getCastToCharWidth(operand.getTypeServices())
            )
        );
View Full Code Here

/*
* <A NAME="columnDefinition">columnDefinition</A>
*/
  final public TableElementNode columnDefinition(TableElementList tableElementList) throws ParseException, StandardException {
        DataTypeDescriptor      typeDescriptor = null;
        ValueNode                       defaultNode = null;
        String                          columnName;
        long[]                          autoIncrementInfo = new long[4];
    /*
      ** RESOLVE: We are ignoring domains and collation.
View Full Code Here

/*
* <A NAME="dataTypeDDL">dataTypeDDL</A>
*/
  final public DataTypeDescriptor dataTypeDDL() throws ParseException, StandardException {
        DataTypeDescriptor      typeDescriptor;
    if (commonDatatypeName(false)) {

    } else {
      jj_consume_token(-1);
      throw new ParseException();
View Full Code Here

/*
* <A NAME="dataTypeCast">dataTypeCast</A>
*/
  final public DataTypeDescriptor dataTypeCast() throws ParseException, StandardException {
        DataTypeDescriptor      typeDescriptor;
    if (commonDatatypeName(true)) {

    } else {
      jj_consume_token(-1);
      throw new ParseException();
View Full Code Here

/*
* <A NAME="dataTypeCommon">dataTypeCommon</A>
*/
  final public DataTypeDescriptor dataTypeCommon() throws ParseException, StandardException {
        DataTypeDescriptor      typeDescriptor;
        boolean checkCS = false;
    if (jj_2_11(1)) {
      if (getToken(2).kind != LARGE) {

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

      } else {
        jj_consume_token(-1);
        throw new ParseException();
      }
      typeDescriptor = nationalCharacterStringType();
    } else if (jj_2_13(1)) {
      typeDescriptor = numericType();
    } else {
      switch (jj_nt.kind) {
      case DATE:
      case TIME:
      case TIMESTAMP:
        typeDescriptor = datetimeType();
        break;
      case BOOLEAN:
        jj_consume_token(BOOLEAN);
        checkInternalFeature(TypeId.BOOLEAN_NAME);
        typeDescriptor = new DataTypeDescriptor(TypeId.BOOLEAN_ID, true);
        break;
      case LONG:
        typeDescriptor = longType();
        break;
      case BINARY:
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.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.