Top Description Fields Constructors Methods
org.apache.derby.impl.sql.execute

public Class UpdateConstantAction

extends WriteCursorConstantAction
Class Inheritance
Imports
org.apache.derby.shared.common.util.ArrayUtil, org.apache.derby.iapi.services.io.StoredFormatIds, .FormatableBitSet, org.apache.derby.iapi.sql.dictionary.IndexRowGenerator, .TableDescriptor, org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo, org.apache.derby.catalog.UUID, java.io.ObjectOutput, .ObjectInput, .IOException, java.util.Properties, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.types.RowLocation

This class describes compiled constants that are passed into UpdateResultSets.

Field Summary

Modifier and TypeField and Description
private long[]
pack-priv RowLocation[]
autoincRowLocation

An array of row location objects (0 based), one for each column in the table.

pack-priv int[]
changedColumnIds

This class implements Formatable.

private String[]
pack-priv String
pack-priv int
private boolean
private String
private String
Inherited from org.apache.derby.impl.sql.execute.WriteCursorConstantAction:
conglomIddeferredheapSCOCIindexCIDSindexNamesindexSCOCIsirgslockModesingleRowSourcetargetUUID

Constructor Summary

AccessConstructor and Description
public
UpdateConstantAction()

Public niladic constructor.

pack-priv
UpdateConstantAction(TableDescriptor
descriptor for the table to be updated
targetTableDesc
,
StaticCompiledOpenConglomInfo
StaticCompiledOpenConglomInfo for heap.
heapSCOCI
,
IndexRowGenerator[]
Index descriptors
irgs
,
long[]
Conglomerate IDs of indices
indexCIDS
,
StaticCompiledOpenConglomInfo[]
StaticCompiledOpenConglomInfos for indexes.
indexSCOCIs
,
String[]
Names of indices on this table for error reporting.
indexNames
,
boolean
True means process as a deferred update.
deferred
,
UUID
UUID of target table
targetUUID
,
int
The lock mode to use (row or table, see TransactionController)
lockMode
,
int[]
Array of ids of changed columns
changedColumnIds
,
FKInfo[]
Array of structures containing foreign key info, if any (may be null)
fkInfo
,
TriggerInfo
Array of structures containing trigger info, if any (may be null)
triggerInfo
,
FormatableBitSet
Map of columns read in. 1 based.
baseRowReadList
,
int[]
BaseRowReadMap[heapColId]->ReadRowColumnId. (0 based)
baseRowReadMap
,
int[]
Null for non rep. (0 based)
streamStorableHeapColIds
,
int
Number of columns being read.
numColumns
,
boolean
is this a positioned update
positionedUpdate
,
boolean
Whether or not source is a single row source
singleRowSource
,
RowLocation[]
Array of rowlocations of autoincrement values in SYSCOLUMNS for each ai column.
autoincRowLocation
,
boolean
True if this is an action of a MERGE statement.
underMerge
,
String
For 10.11 and higher, the handle on the sequence for the identity column
identitySequenceUUIDString
)

Make the ConstantAction for an UPDATE statement.

Method Summary

Modifier and TypeMethod and Description
public long
getAutoincIncrement(int
the column number
i
)

gets the increment value for a column.

pack-priv RowLocation[]
getAutoincRowLocation()

gets the row location

public String
getColumnName(int
the column number
i
)

gets the name of the desired column in the taget table.

pack-priv String[]
getColumnNames()

get the array of column names in the target table.

public String
public String
public int

Returns:

the formatID of this class
getTypeFormatId
()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

public boolean

Returns:

True if the table has ai columns
hasAutoincrement
()

Does the target table has autoincrement columns.

public void
readExternal(ObjectInput
read this.
in
)

Overrides org.apache.derby.impl.sql.execute.WriteCursorConstantAction.readExternal.

Implements java.io.Externalizable.readExternal.

Read this object from a stream of stored objects.

public void
writeExternal(ObjectOutput
write bytes here.
out
)

Overrides org.apache.derby.impl.sql.execute.WriteCursorConstantAction.writeExternal.

Implements java.io.Externalizable.writeExternal.

Write this object to a stream of stored objects.

Inherited from org.apache.derby.impl.sql.execute.WriteCursorConstantAction:
executeConstantActiongetBaseRowReadListgetBaseRowReadMapgetConglomerateIdgetFKInfogetIndexNameFromCIDgetIndexNamesgetPropertygetStreamStorableHeapColIdsgetTargetPropertiesgetTriggerInfounderMerge

Field Detail

autoincIncrementback to summary
private long[] autoincIncrement
autoincRowLocationback to summary
pack-priv RowLocation[] autoincRowLocation

An array of row location objects (0 based), one for each column in the table. If the column is an autoincrement table then the array points to the row location of the column in SYSCOLUMNS. if not, then it contains null.

changedColumnIdsback to summary
pack-priv int[] changedColumnIds

This class implements Formatable. But it is NOT used across either major or minor releases. It is only written persistently in stored prepared statements, not in the replication stage. SO, IT IS OK TO CHANGE ITS read/writeExternal.

columnNamesback to summary
private String[] columnNames
identitySequenceUUIDStringback to summary
pack-priv String identitySequenceUUIDString
numColumnsback to summary
pack-priv int numColumns
positionedUpdateback to summary
private boolean positionedUpdate
schemaNameback to summary
private String schemaName
tableNameback to summary
private String tableName

Constructor Detail

UpdateConstantActionback to summary
public UpdateConstantAction()

Public niladic constructor. Needed for Formatable interface to work.

UpdateConstantActionback to summary
pack-priv UpdateConstantAction(TableDescriptor targetTableDesc, StaticCompiledOpenConglomInfo heapSCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, String[] indexNames, boolean deferred, UUID targetUUID, int lockMode, int[] changedColumnIds, FKInfo[] fkInfo, TriggerInfo triggerInfo, FormatableBitSet baseRowReadList, int[] baseRowReadMap, int[] streamStorableHeapColIds, int numColumns, boolean positionedUpdate, boolean singleRowSource, RowLocation[] autoincRowLocation, boolean underMerge, String identitySequenceUUIDString) throws StandardException

Make the ConstantAction for an UPDATE statement.

Parameters
targetTableDesc:TableDescriptor

descriptor for the table to be updated

heapSCOCI:StaticCompiledOpenConglomInfo

StaticCompiledOpenConglomInfo for heap.

irgs:IndexRowGenerator[]

Index descriptors

indexCIDS:long[]

Conglomerate IDs of indices

indexSCOCIs:StaticCompiledOpenConglomInfo[]

StaticCompiledOpenConglomInfos for indexes.

indexNames:String[]

Names of indices on this table for error reporting.

deferred:boolean

True means process as a deferred update.

targetUUID:UUID

UUID of target table

lockMode:int

The lock mode to use (row or table, see TransactionController)

changedColumnIds:int[]

Array of ids of changed columns

fkInfo:FKInfo[]

Array of structures containing foreign key info, if any (may be null)

triggerInfo:TriggerInfo

Array of structures containing trigger info, if any (may be null)

baseRowReadList:FormatableBitSet

Map of columns read in. 1 based.

baseRowReadMap:int[]

BaseRowReadMap[heapColId]->ReadRowColumnId. (0 based)

streamStorableHeapColIds:int[]

Null for non rep. (0 based)

numColumns:int

Number of columns being read.

positionedUpdate:boolean

is this a positioned update

singleRowSource:boolean

Whether or not source is a single row source

autoincRowLocation:RowLocation[]

Array of rowlocations of autoincrement values in SYSCOLUMNS for each ai column.

underMerge:boolean

True if this is an action of a MERGE statement.

identitySequenceUUIDString:String

For 10.11 and higher, the handle on the sequence for the identity column

Method Detail

getAutoincIncrementback to summary
public long getAutoincIncrement(int i)

gets the increment value for a column.

Parameters
i:int

the column number

getAutoincRowLocationback to summary
pack-priv RowLocation[] getAutoincRowLocation()

gets the row location

getColumnNameback to summary
public String getColumnName(int i)

gets the name of the desired column in the taget table.

Parameters
i:int

the column number

getColumnNamesback to summary
pack-priv String[] getColumnNames()

get the array of column names in the target table.

getSchemaNameback to summary
public String getSchemaName()
getTableNameback to summary
public String getTableName()
getTypeFormatIdback to summary
public int getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

Returns:int

the formatID of this class

hasAutoincrementback to summary
public boolean hasAutoincrement()

Does the target table has autoincrement columns.

Returns:boolean

True if the table has ai columns

readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Overrides org.apache.derby.impl.sql.execute.WriteCursorConstantAction.readExternal.

Implements java.io.Externalizable.readExternal.

Doc from org.apache.derby.impl.sql.execute.WriteCursorConstantAction.readExternal.

Read this object from a stream of stored objects.

Parameters
in:ObjectInput

read this.

Exceptions
IOException:
thrown on error
ClassNotFoundException:
thrown on error
See Also
java.io.Externalizable#readExternal
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Overrides org.apache.derby.impl.sql.execute.WriteCursorConstantAction.writeExternal.

Implements java.io.Externalizable.writeExternal.

Doc from org.apache.derby.impl.sql.execute.WriteCursorConstantAction.writeExternal.

Write this object to a stream of stored objects.

Parameters
out:ObjectOutput

write bytes here.

Exceptions
IOException:
thrown on error
See Also
java.io.Externalizable#writeExternal