Package org.apache.derby.iapi.types

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


            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

            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

   * @exception StandardException    Thrown on error
   */
  public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
              Vector  aggregateVector)
          throws StandardException
  {    DataTypeDescriptor dtd;
    int nodeType = getNodeType();
    switch (nodeType)
    {
    case C_NodeTypes.USER_NODE:
    case C_NodeTypes.CURRENT_USER_NODE:
View Full Code Here

      case StoredFormatIds.DECIMAL_TYPE_ID:
        if (defType == StoredFormatIds.DECIMAL_TYPE_ID) {
        // only valid if scale and precision are within
        // those of the column.  Note that scale here should
        // exclude any trailing 0's after the decimal
          DataTypeDescriptor defDesc = defaultNode.getTypeServices();
          int len = defaultText.length();
          int precision = defDesc.getPrecision();
          int scale = defDesc.getScale();
          for (int i = 1; i <= scale; scale--, precision--) {
            if (defaultText.charAt(len - i) != '0')
              break;
          }
          return ((scale <= columnDesc.getScale()) &&
View Full Code Here

    ColumnDescriptor columnDescriptor =
      td.getColumnDescriptor(colName),
      newColumnDescriptor = null;
       
        // Get the type and change the nullability
    DataTypeDescriptor dataType =
            columnDescriptor.getType().getNullabilityType(nullability);

        //check if there are any unique constraints to update
        ConstraintDescriptorList cdl = dd.getConstraintDescriptors(td);
        int columnPostion = columnDescriptor.getPosition();
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

            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

    int          position = 1;

    for (int index = 0; index < columnCount; index++)
    {
        ResultColumn rc = (ResultColumn) elementAt(index);
      DataTypeDescriptor dataType = rc.getTypeServices();
      DataValueDescriptor dataValue = dataType.getNull();

      row.setColumn( position++, dataValue );
    }

    return  row;
View Full Code Here

    ExecRow row = getExecutionFactory().getValueRow(baseCols.length + 1);

    for (int i = 0; i < baseCols.length; i++)
    {
      ColumnDescriptor coldes = td.getColumnDescriptor(baseCols[i]);
      DataTypeDescriptor dataType = coldes.getType();

      // rc = getResultColumn(baseCols[i]);
        // rc = (ResultColumn) at(baseCols[i] - 1);
      // dataType = rc.getTypeServices();
      DataValueDescriptor dataValue = dataType.getNull();

      row.setColumn(i + 1, dataValue );
    }

    RowLocation rlTemplate = scc.newRowLocationTemplate();
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.