Class DMLWriteResultSet

java.lang.Object
org.apache.derby.impl.sql.execute.NoRowsResultSetImpl
org.apache.derby.impl.sql.execute.DMLWriteResultSet
All Implemented Interfaces:
ResultSet
Direct Known Subclasses:
DeleteResultSet, DMLVTIResultSet, DMLWriteGeneratedColumnsResultSet

public abstract class DMLWriteResultSet extends NoRowsResultSetImpl
For INSERT/UPDATE/DELETE impls. Used to tag them.
  • Field Details

    • constantAction

      protected WriteCursorConstantAction constantAction
    • baseRowReadMap

      protected int[] baseRowReadMap
    • streamStorableHeapColIds

      protected int[] streamStorableHeapColIds
    • heapDCOCI

      protected DynamicCompiledOpenConglomInfo heapDCOCI
    • indexDCOCIs

      protected DynamicCompiledOpenConglomInfo[] indexDCOCIs
    • needToObjectifyStream

      private boolean needToObjectifyStream
    • rowCount

      public long rowCount
    • resultDescription

      protected ResultDescription resultDescription
    • cachedDestinations

      protected DataValueDescriptor[] cachedDestinations
      This array contains data value descriptors that can be used (and reused) to hold the normalized column values.
  • Constructor Details

  • Method Details

    • modifiedRowCount

      public final long modifiedRowCount()
      Description copied from class: NoRowsResultSetImpl
      Returns zero.
      Specified by:
      modifiedRowCount in interface ResultSet
      Overrides:
      modifiedRowCount in class NoRowsResultSetImpl
      Returns:
      The number of rows affect by the statement, so far.
    • getResultDescription

      public ResultDescription getResultDescription()
      Returns the description of the inserted rows. REVISIT: Do we want this to return NULL instead?
      Specified by:
      getResultDescription in interface ResultSet
      Overrides:
      getResultDescription in class NoRowsResultSetImpl
      Returns:
      the description of the inserted rows
    • getNextRowCore

      protected ExecRow getNextRowCore(NoPutResultSet source) throws StandardException
      Get next row from the source result set.
      Parameters:
      source - SourceResultSet Also look at Track#2432/change 12433
      Returns:
      The next row in the result set
      Throws:
      StandardException - Standard error policy
    • objectifyStreams

      private void objectifyStreams(ExecRow row) throws StandardException
      Throws:
      StandardException
    • makeDeferredSparseRow

      protected ExecRow makeDeferredSparseRow(ExecRow deferredBaseRow, FormatableBitSet baseRowReadList, LanguageConnectionContext lcc) throws StandardException
      For deferred update, get a deferred sparse row based on the deferred non-sparse row. Share the underlying columns. If there is no column bit map, make them the same row.
      Parameters:
      deferredBaseRow - the deferred non-sparse row
      baseRowReadList - the columns to include (1-based bit map)
      lcc - the language connection context
      Returns:
      the deferred sparse row
      Throws:
      StandardException - Thrown on error
    • decodeLockMode

      int decodeLockMode(int lockMode)
      Decode the update lock mode.

      The value for update lock mode is in the second most significant byte for TransactionControl.SERIALIZABLE_ISOLATION_LEVEL isolation level. Otherwise (REPEATABLE READ, READ COMMITTED, and READ UNCOMMITTED) the lock mode is located in the least significant byte.

      This is done to override the optimizer choice to provide maximum concurrency of record level locking except in SERIALIZABLE where table level locking is required in heap scans for correctness.

      Parameters:
      lockMode - the compiled encoded lock mode for this query
      Returns:
      the lock mode (record or table) to use to open the result set
      See Also:
    • getIndexNameFromCID

      String getIndexNameFromCID(long indexCID)
      get the index name given the conglomerate id of the index.
      Parameters:
      indexCID - conglomerate ID of the index.
      Returns:
      index name of given index.
    • normalizeRow

      protected ExecRow normalizeRow(NoPutResultSet sourceResultSet, ExecRow row) throws StandardException

      Normalize a row as part of the INSERT/UPDATE action of a MERGE statement. This applies logic usually found in a NormalizeResultSet, which is missing for the MERGE statement.

      Parameters:
      sourceResultSet - the result set for which this action is to be performed
      row - the row to be normalized
      Returns:
      the normalized row
      Throws:
      StandardException - Standard error policy
    • rememberConstraint

      public void rememberConstraint(UUID cid) throws StandardException
      Throws:
      StandardException