*
* Sets the updated column of the hash table to true and updates the row
* in the hash table with the new values for the row.
*/
public void updateRow(ExecRow row) throws StandardException {
ExecRow newRow = row;
boolean undoProjection = false;
if (source instanceof ProjectRestrictResultSet) {
newRow = ((ProjectRestrictResultSet)source).
doBaseRowProjection(row);
undoProjection = true;
}
positionInHashTable.setValue(currentPosition);
DataValueDescriptor[] hashRowArray = (DataValueDescriptor[])
ht.get(positionInHashTable);
RowLocation rowLoc = (RowLocation) hashRowArray[POS_ROWLOCATION];
ht.remove(new SQLInteger(currentPosition));
addRowToHashTable(newRow, currentPosition, rowLoc, true);
// Modify row to refer to data in the BackingStoreHashtable.
// This allows reading of data which goes over multiple pages
// when doing the actual update (LOBs). Putting columns of
// type SQLBinary to disk, has destructive effect on the columns,
// and they need to be re-read. That is the reason this is needed.
if (undoProjection) {
final DataValueDescriptor[] newRowData = newRow.getRowArray();
// Array of original position in row
final int[] origPos =((ProjectRestrictResultSet)source).
getBaseProjectMapping();