Examples of DataValueDescriptor


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

    for (int index = 0; index < columnCount; index++)
    {
      ColumnDescriptor cd = (ColumnDescriptor) columnDescriptorList.elementAt(index);
      //String name = column.getColumnName();
      DataValueDescriptor dataValue = cd.getType().getNull();
      result.setColumn(index + 1, dataValue);
    }
    return result;
  }
View Full Code Here

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

    throws StandardException
  {
    int numColumns = ourIndexRow.nColumns();
    for (int index = 1; index <= numColumns; index++)
    {
      DataValueDescriptor oldOrderable = ourIndexRow.getColumn(index);
      DataValueDescriptor newOrderable = ourUpdatedIndexRow.getColumn(index);
      if (! (oldOrderable.compare(DataValueDescriptor.ORDER_OP_EQUALS, newOrderable, true, true)))
      {
        return true;
      }
    }
View Full Code Here

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

                            }
                        }
                       
                        if(col <= maxColumns)
                        {
                            DataValueDescriptor dvd = row.cloneColumn(col);
                            user_autoinc = dvd.getLong();
                        }
             }

      // No need to do a next on a single row source
             if (constants.singleRowSource)
View Full Code Here

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

        int readIx = (baseRowReadMap == null) ?
          heapIx :
          baseRowReadMap[heapIx];

               
        DataValueDescriptor col = row.getColumn(readIx+1);
        InputStream stream = ((StreamStorable)col).returnStream();
        ((StreamStorable)col).loadStream();
        // DERBY-3238
        // fix up any duplicate streams, for instance in the case of an update with a trigger,
        // all the columns are read as update columns even if they are not updated, so
        // the update column will still have a reference to the original stream.
        // If we knew from this context that this was an update and we knew the number
        // of columns in the base table we would be able to calculate exactly the offset to
        // check, but we don't have that information from this context.
        // If DERBY-1482 is fixed, perhaps this code can be removed.
       
        if (stream != null)
          for (int i = 1; i <= row.nColumns(); i++)
          {
            DataValueDescriptor c = row.getColumn(i);
            if (c instanceof StreamStorable)
              if (((StreamStorable)c).returnStream() == stream)
                row.setColumn(i, col.getClone());
          }
        }
View Full Code Here

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

                        DataValueDescriptor v4,
                        int judgeTypeFormatId,
                        int judgeUserJDBCTypeId)
                    throws StandardException
  {
    DataValueDescriptor judge;
    if (judgeUserJDBCTypeId == -1)
      judge = (DataValueDescriptor) new TypeId(judgeTypeFormatId, null).getNull();
    else
      judge = (DataValueDescriptor) new TypeId(judgeTypeFormatId, new UserDefinedTypeIdImpl()).getNull();
     
    DataValueDescriptor minVal = v1;
    if (v2 != null && judge.lessThan(v2, minVal).equals(true))
      minVal = v2;
    if (v3 != null && judge.lessThan(v3, minVal).equals(true))
      minVal = v3;
    if (v4 != null && judge.lessThan(v4, minVal).equals(true))
View Full Code Here

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

                        DataValueDescriptor v4,
                        int judgeTypeFormatId,
                        int judgeUserJDBCTypeId)
                    throws StandardException
  {
    DataValueDescriptor judge;
    if (judgeUserJDBCTypeId == -1)
      judge =  new TypeId(judgeTypeFormatId, null).getNull();
    else
      judge =  new TypeId(judgeTypeFormatId, new UserDefinedTypeIdImpl()).getNull();

    DataValueDescriptor maxVal = v1;
    if (v2 != null && judge.greaterThan(v2, maxVal).equals(true))
      maxVal = v2;
    if (v3 != null && judge.greaterThan(v3, maxVal).equals(true))
      maxVal = v3;
    if (v4 != null && judge.greaterThan(v4, maxVal).equals(true))
View Full Code Here

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

    if (SanityManager.DEBUG)
        SanityManager.ASSERT( ! isOpen, "ProjectRestrictResultSet already open");

    if (constantRestriction != null)
    {
        DataValueDescriptor restrictBoolean;
            restrictBoolean = (DataValueDescriptor)
          constantRestriction.invoke(activation);

              // if the result is null, we make it false --
        // so the row won't be returned.
            constantEval = (restrictBoolean == null) ||
            ((! restrictBoolean.isNull()) &&
              restrictBoolean.getBoolean());
    }

    if (constantEval)
    {
          source.openCore();
View Full Code Here

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

    if (SanityManager.DEBUG)
        SanityManager.ASSERT(isOpen, "ProjectRestrictResultSet not open, cannot reopen");

    if (constantRestriction != null)
    {
        DataValueDescriptor restrictBoolean;
            restrictBoolean = (DataValueDescriptor)
          constantRestriction.invoke(activation);

              // if the result is null, we make it false --
        // so the row won't be returned.
            constantEval = (restrictBoolean == null) ||
            ((! restrictBoolean.isNull()) &&
              restrictBoolean.getBoolean());
    }

    if (constantEval)
    {
          source.reopenCore();
View Full Code Here

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

  public ExecRow  getNextRowCore() throws StandardException {

      ExecRow candidateRow = null;
      ExecRow result = null;
      boolean restrict = false;
      DataValueDescriptor restrictBoolean;
    long  beginRT = 0;

    /* Return null if open was short circuited by false constant expression */
    if (shortCircuitOpen)
    {
      return result;
    }

    beginTime = getCurrentTimeMillis();
      do
    {
      candidateRow = source.getNextRowCore();
      if (candidateRow != null)
      {
        beginRT = getCurrentTimeMillis();
        /* If restriction is null, then all rows qualify */
        if (restriction == null)
        {
          restrict = true;
        }
        else
        {
          setCurrentRow(candidateRow);
                restrictBoolean = (DataValueDescriptor)
                      restriction.invoke(activation);
          restrictionTime += getElapsedMillis(beginRT);

                // if the result is null, we make it false --
          // so the row won't be returned.
            restrict = ((! restrictBoolean.isNull()) &&
                 restrictBoolean.getBoolean());
          if (! restrict)
          {
            rowsFiltered++;
          }
        }
View Full Code Here

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

   */
  public ExecRow getCurrentRow() throws StandardException {
      ExecRow candidateRow = null;
      ExecRow result = null;
      boolean restrict = false;
      DataValueDescriptor restrictBoolean;

    if (SanityManager.DEBUG)
      SanityManager.ASSERT(isOpen, "PRRS is expected to be open");

    /* Nothing to do if we're not currently on a row */
    if (currentRow == null)
    {
      return null;
    }

    /* Call the child result set to get it's current row.
     * If no row exists, then return null, else requalify it
     * before returning.
     */
    candidateRow = ((CursorResultSet) source).getCurrentRow();
    if (candidateRow != null) {
      setCurrentRow(candidateRow);
        /* If restriction is null, then all rows qualify */
            restrictBoolean = (DataValueDescriptor)
          ((restriction == null) ? null : restriction.invoke(activation));

            // if the result is null, we make it false --
      // so the row won't be returned.
            restrict = (restrictBoolean == null) ||
            ((! restrictBoolean.isNull()) &&
              restrictBoolean.getBoolean());
    }

      if (candidateRow != null && restrict)
    {
      result = doProjection(candidateRow);
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.