Examples of NumberDataValue


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

    if (incrementNeeded)
    {
      ExecRow readRow = ti.getRow(tc, keyRow,
                  SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID);
      NumberDataValue increment =
        (NumberDataValue)readRow.getColumn(SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTINC);
      aiValue += increment.getLong();
    }
    row.setColumn(SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTVALUE,
            dvf.getDataValue(aiValue));

    ti.updateRow(keyRow, row,
View Full Code Here

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

       */
      value = addend.getClone();
    }
    else
    {
      NumberDataValue  input = (NumberDataValue)addend;
      NumberDataValue nv = (NumberDataValue) value;

      value = nv.plus(
            input,            // addend 1
            nv,    // addend 2
            nv)// result
    }
  }
View Full Code Here

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

    {
      SanityManager.ASSERT(!isNull(), "getSeconds called on a null");
      SanityManager.ASSERT(source == null || source instanceof SQLDouble,
    "getSeconds for a timestamp was given a source other than a SQLDouble");
    }
    NumberDataValue result;

    if (source != null)
      result = source;
    else
      result = new SQLDouble();

    result.setValue((double)(SQLTime.getSecond(encodedTime))
        + ((double)nanos)/1.0e9);

    return result;
  }
View Full Code Here

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

                return previous;
        }
        public final NumberDataValue getDecimalDataValue(Number value)
      throws StandardException
        {
      NumberDataValue ndv = getNullDecimal((NumberDataValue) null);
      ndv.setValue(value);
      return ndv;
        }
View Full Code Here

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

     
    case C_NodeTypes.DECIMAL_CONSTANT_NODE:
      if (valueInP)
      {

        NumberDataValue constantDecimal = getDataValueFactory().getDecimalDataValue((String) arg1);

        typeid = Types.DECIMAL;
        precision = constantDecimal.getDecimalValuePrecision();
        scal = constantDecimal.getDecimalValueScale();
        /* be consistent with our convention on maxwidth, see also
         * exactNumericType(), otherwise we get format problem, b 3923
         */
        maxwidth = DataTypeUtilities.computeMaxWidth(precision, scal);
        setValue(constantDecimal);
View Full Code Here

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

                heapCC.fetch(rl, row.getRowArray(), columnToRead, wait);

            columnToUpdate.set(columnNum - 1); // current value.

            // while the Row interface is 1 based.
            NumberDataValue currentAI = (NumberDataValue)row.getColumn(columnNum);
            long currentAIValue = currentAI.getLong();
            NumberDataValue increment = (NumberDataValue)row.getColumn(columnNum + 2);
           
            if (doUpdate)
            {
                // we increment and store the new value in SYSCOLUMNS
                currentAI = currentAI.plus(currentAI, increment, currentAI);
View Full Code Here

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

    if (incrementNeeded)
    {
      ExecRow readRow = ti.getRow(tc, keyRow,
                  SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID);
      NumberDataValue increment =
        (NumberDataValue)readRow.getColumn(SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTINC);
      aiValue += increment.getLong();
    }
    row.setColumn(SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTVALUE,
            dvf.getDataValue(aiValue));

    ti.updateRow(keyRow, row,
View Full Code Here

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

     
    case C_NodeTypes.DECIMAL_CONSTANT_NODE:
      if (valueInP)
      {

        NumberDataValue constantDecimal = getDataValueFactory().getDecimalDataValue((String) arg1);

        typeid = Types.DECIMAL;
        precision = constantDecimal.getDecimalValuePrecision();
        scal = constantDecimal.getDecimalValueScale();
        /* be consistent with our convention on maxwidth, see also
         * exactNumericType(), otherwise we get format problem, b 3923
         */
        maxwidth = DataTypeUtilities.computeMaxWidth(precision, scal);
        setValue(constantDecimal);
View Full Code Here

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

                heapCC.fetch(rl, row.getRowArray(), columnToRead, wait);

            columnToUpdate.set(columnNum - 1); // current value.

            // while the Row interface is 1 based.
            NumberDataValue currentAI = (NumberDataValue)row.getColumn(columnNum);
            long currentAIValue = currentAI.getLong();
            NumberDataValue increment = (NumberDataValue)row.getColumn(columnNum + 2);
           
            if (doUpdate)
            {
                // we increment and store the new value in SYSCOLUMNS
                currentAI = currentAI.plus(currentAI, increment, currentAI);
View Full Code Here

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

    if (incrementNeeded)
    {
      ExecRow readRow = ti.getRow(tc, keyRow,
                  SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID);
      NumberDataValue increment =
        (NumberDataValue)readRow.getColumn(SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTINC);
      aiValue += increment.getLong();
    }
    row.setColumn(SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTVALUE,
            new SQLLongint(aiValue));

    ti.updateRow(keyRow, row,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.