Package org.apache.derby.iapi.types

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


            if ( forUpdate && !rc.updated() ) { continue; }
           
            if ( rc.hasGenerationClause() )
            {
                ColumnDescriptor    colDesc = rc.getTableColumnDescriptor();
                DataTypeDescriptor  dtd = colDesc.getType();
                DefaultInfo             di = colDesc.getDefaultInfo();
                ValueNode   generationClause = parseGenerationClause( di.getDefaultText(), targetTableDescriptor );

                // insert CAST in case column data type is not same as the
                // resolved type of the generation clause
View Full Code Here


     */
    public boolean hasLargeObjectColumns() {
        for (int i = 0; i < resultColumns.size(); i++) {
            ResultColumn rc = (ResultColumn) resultColumns.elementAt(i);
            if (rc.isReferenced()) {
                DataTypeDescriptor type = rc.getType();
                if (type != null && type.getTypeId().isLOBTypeId()) {
                    return true;
                }
            }
        }
        return false;
View Full Code Here

            for (int i = 0; i < refCols.size(); i++)
            {
                if (refCols.isSet(i))
                {
                    ResultColumn rc = (ResultColumn) resultColumns.elementAt(i);
                    DataTypeDescriptor expressionType = rc.getExpression().getTypeServices();
                    if( expressionType != null)
                        perRowUsage += expressionType.estimatedMemoryUsage();
                }
            }

            /*
            ** If the proposed conglomerate is a non-covering index, add the
View Full Code Here

      throw StandardException.newException(SQLState.LANG_OBJECT_NOT_FOUND, AliasDescriptor.getAliasType(udtNameSpace),  unqualifiedTypeName);
    }

        createTypeDependency( ad );

        DataTypeDescriptor result = new DataTypeDescriptor
            (
             TypeId.getUserDefinedTypeId( typeSchema.getSchemaName(), unqualifiedTypeName, ad.getJavaClassName() ),
             originalDTD.isNullable()
             );
View Full Code Here

        {
            TypeDescriptor columnType = columnTypes[ i ];

            if ( columnType.isUserDefinedType() )
            {
                DataTypeDescriptor newColumnDTD = DataTypeDescriptor.getType( columnType );

                newColumnDTD = bindUserType( newColumnDTD );

                TypeDescriptor newColumnType = newColumnDTD.getCatalogType();

                // poke the bound type back into the multi set descriptor
                columnTypes[ i ] = newColumnType;
            }
        }
View Full Code Here

                    SQLState.LANG_INVALID_ROW_COUNT_OFFSET,
                    Long.toString(val) );
            }
        } else if (offset instanceof ParameterNode) {
            offset.
                setType(new DataTypeDescriptor(
                            TypeId.getBuiltInTypeId(Types.BIGINT),
                            false /* ignored tho; ends up nullable,
                                     so we test for NULL at execute time */));
        }


        if (fetchFirst instanceof ConstantNode) {
            DataValueDescriptor dvd = ((ConstantNode)fetchFirst).getValue();
            long val = dvd.getLong();

            if (val < 1) {
                throw StandardException.newException(
                    SQLState.LANG_INVALID_ROW_COUNT_FIRST,
                    Long.toString(val) );
            }
        } else if (fetchFirst instanceof ParameterNode) {
            fetchFirst.
                setType(new DataTypeDescriptor(
                            TypeId.getBuiltInTypeId(Types.BIGINT),
                            false /* ignored tho; ends up nullable,
                                     so we test for NULL at execute time*/));
        }
    }
View Full Code Here

            ReaderToUTF8Stream utfIn;
            final StringDataValue dvd = (StringDataValue)
                    getParms().getParameter(parameterIndex -1);
            dvd.setStreamHeaderFormat(usePreTenFiveHdrFormat());
            // Need column width to figure out if truncation is needed
            DataTypeDescriptor dtd[] = preparedStatement
                    .getParameterTypes();
            int colWidth = dtd[parameterIndex - 1].getMaximumWidth();
            // Holds either UNKNOWN_LOGICAL_LENGTH or the exact logical length.
            int usableLength = DataValueDescriptor.UNKNOWN_LOGICAL_LENGTH;
View Full Code Here

        try {
            RawToBinaryFormatStream rawStream;
            if (lengthLess) {
                // Indicate that we don't know the logical length of the stream.
                length = DataValueDescriptor.UNKNOWN_LOGICAL_LENGTH;
                DataTypeDescriptor dtd[] =
                    preparedStatement.getParameterTypes();
                rawStream = new RawToBinaryFormatStream(x,
                        dtd[parameterIndex -1].getMaximumWidth(),
                        dtd[parameterIndex -1].getTypeName());
            } else {
View Full Code Here

  public ExecRow makeSYSSTATEMENTSrow(
    boolean        compileMe,
    SPSDescriptor    spsDescriptor
  ) throws StandardException
  {
    DataTypeDescriptor    dtd;
    ExecRow            row;
    DataValueDescriptor    col;
    String          name = null;
    UUID          uuid = null;
    String          uuidStr = null
View Full Code Here

   */
  public void initialize(DataTypeDescriptor[] types) throws StandardException
  {
    for (int i = 0; i < parms.length; i++)
    {
      DataTypeDescriptor dtd = types[i];
     
      parms[i].initialize(dtd.getNull(),
          dtd.getJDBCTypeId(), dtd.getTypeId().getCorrespondingJavaTypeName());
    }
  }
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.