/**
  * If we're updating a unique index, the inserts have to be deferred. This is to avoid uniqueness
  * violations that are only temporary. If we do all the deletes first, only "true" uniqueness
  * violations can happen. We do this here, rather than in open(), because this is the only
  * operation that requires deferred inserts, and we only want to create the conglomerate if
  * necessary.
  *
  * @param newRow the base table row.
  * @param baseRowLocation the base table row's location.
  * @exception StandardException Thrown on error
  */
 void insertForUpdate(ExecRow newRow, RowLocation baseRowLocation) throws StandardException {
   setOurIndexRow(newRow, baseRowLocation);
   // defer inserts if its on unique or UniqueWhereNotNull index
   if (irg.isUnique() || irg.isUniqueWithDuplicateNulls()) {
     doDeferredInsert();
   } else {
     doInsert();
   }
 }
  /**
   * Set the column values for 'ourUpdatedIndexRow' to refer to a base table row and location
   * provided by the caller. The idea here is to
   *
   * @param baseRow a base table row.
   * @param baseRowLoc baseRowLoc baseRow's location
   * @exception StandardException Thrown on error
   */
  private void setOurUpdatedIndexRow(ExecRow baseRow, RowLocation baseRowLoc)
      throws StandardException {
    ourUpdatedIndexRow = irg.getIndexRowKeyTemplate();

    irg.getIndexRowKey(baseRow, baseRowLoc, ourUpdatedIndexRow, baseRowReadMap);
  }