ResultSet
InsertResultSet
, UpdateResultSet
public abstract class DMLWriteGeneratedColumnsResultSet extends DMLWriteResultSet
Modifier and Type | Field | Description |
---|---|---|
protected DataValueDescriptor[] |
aiCache |
keeps track of autoincrement values that are generated by
getSetAutoincrementValues.
|
protected int[] |
autoGeneratedKeysColumnIndexes |
|
protected ResultSet |
autoGeneratedKeysResultSet |
|
protected TemporaryRowHolderImpl |
autoGeneratedKeysRowsHolder |
|
protected boolean |
autoincrementGenerated |
If set to true, implies that Derby has generated autoincrement
values for this (rep)resultset.
|
protected java.lang.String |
identitySequenceUUIDString |
|
protected long |
identityVal |
|
protected boolean |
setIdentity |
|
protected NoPutResultSet |
sourceResultSet |
baseRowReadMap, cachedDestinations, constantAction, heapDCOCI, indexDCOCIs, resultDescription, rowCount, streamStorableHeapColIds
activation, beginExecutionTime, beginTime, endExecutionTime, endTime, lcc
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
Constructor | Description |
---|---|
DMLWriteGeneratedColumnsResultSet(Activation activation) |
Constructor
|
DMLWriteGeneratedColumnsResultSet(Activation activation,
ConstantAction constantAction) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
firstExecuteSpecialHandlingAutoGen(boolean firstExecute,
RowChanger rowChanger,
UUID targetUUID) |
|
private int[] |
generatedColumnPositionsArray(UUID targetUUID) |
If user didn't provide columns list for auto-generated columns, then only include
columns with auto-generated values in the resultset.
|
ResultSet |
getAutoGeneratedKeysResultset() |
ResultSet for rows inserted into the table (contains auto-generated keys columns only)
|
protected ExecRow |
getCompactRow(ExecRow inputRow,
int[] columnIndexes) |
Take the input row and return a new compact ExecRow
using the column positions provided in columnIndexes.
|
NumberDataValue |
getSetAutoincrementValue(int columnPosition,
long increment) |
getSetAutoincrementValue will get the autoincrement value of the
columnPosition specified for the target table.
|
void |
saveAIcacheInformation(java.lang.String schemaName,
java.lang.String tableName,
java.lang.String[] columnNames) |
|
private int[] |
uniqueColumnPositionArray(int[] columnIndexes,
UUID targetUUID) |
Remove duplicate columns from the array.
|
private boolean |
verifyAutoGenColumn(ColumnDescriptor cd) |
Check that the received ColumnDescriptor corresponds to a column
for which it is possible to fetch auto-generated keys.
|
private void |
verifyAutoGeneratedColumnsIndexes(int[] columnIndexes,
UUID targetUUID) |
Verify that the auto-generated columns list (by position) has valid
column positions for the table.
|
private void |
verifyAutoGeneratedColumnsNames(java.lang.String[] columnNames,
UUID targetUUID) |
Verify that the auto-generated columns list (by name) has valid
column names for the table.
|
protected void |
verifyAutoGeneratedRScolumnsList(UUID targetUUID) |
decodeLockMode, getIndexNameFromCID, getNextRowCore, getResultDescription, makeDeferredSparseRow, modifiedRowCount, normalizeRow, rememberConstraint
addWarning, checkRowPosition, clearCurrentRow, close, doesCommit, evaluateGenerationClauses, finish, getAbsoluteRow, getActivation, getBeginExecutionTimestamp, getCurrentTimeMillis, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getQueryPlanText, getRelativeRow, getRowNumber, getSubqueryTrackingArray, getTimeSpent, getWarnings, isClosed, returnsRows, setAfterLastRow, setBeforeFirstRow, setup, toXML
protected DataValueDescriptor[] aiCache
protected java.lang.String identitySequenceUUIDString
protected NoPutResultSet sourceResultSet
protected ResultSet autoGeneratedKeysResultSet
protected TemporaryRowHolderImpl autoGeneratedKeysRowsHolder
protected int[] autoGeneratedKeysColumnIndexes
protected boolean autoincrementGenerated
protected long identityVal
protected boolean setIdentity
DMLWriteGeneratedColumnsResultSet(Activation activation) throws StandardException
activation
- an activationStandardException
- on errorDMLWriteGeneratedColumnsResultSet(Activation activation, ConstantAction constantAction) throws StandardException
StandardException
public NumberDataValue getSetAutoincrementValue(int columnPosition, long increment) throws StandardException
columnPosition
- position of the column in the table (1-based)increment
- amount of increment.StandardException
- if anything goes wrong.public void saveAIcacheInformation(java.lang.String schemaName, java.lang.String tableName, java.lang.String[] columnNames) throws StandardException
StandardException
protected void verifyAutoGeneratedRScolumnsList(UUID targetUUID) throws StandardException
StandardException
private void verifyAutoGeneratedColumnsIndexes(int[] columnIndexes, UUID targetUUID) throws StandardException
StandardException
private void verifyAutoGeneratedColumnsNames(java.lang.String[] columnNames, UUID targetUUID) throws StandardException
StandardException
- Thrown on error if invalid column
name in the list.private boolean verifyAutoGenColumn(ColumnDescriptor cd)
protected void firstExecuteSpecialHandlingAutoGen(boolean firstExecute, RowChanger rowChanger, UUID targetUUID) throws StandardException
StandardException
private int[] generatedColumnPositionsArray(UUID targetUUID) throws StandardException
StandardException
private int[] uniqueColumnPositionArray(int[] columnIndexes, UUID targetUUID) throws StandardException
StandardException
protected ExecRow getCompactRow(ExecRow inputRow, int[] columnIndexes) throws StandardException
StandardException
public ResultSet getAutoGeneratedKeysResultset()
ResultSet
getAutoGeneratedKeysResultset
in interface ResultSet
getAutoGeneratedKeysResultset
in class NoRowsResultSetImpl
ResultSet.getAutoGeneratedKeysResultset()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.