org.apache.derby.impl.sql.execute
Class InsertConstantAction
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.InsertConstantAction
-
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, Formatable, TypedFormat, ConstantAction
public class InsertConstantAction extends java.lang.ObjectThis class describes compiled constants that are passed into InsertResultSets.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description booleanhasDeferrableChecks-
Fields inherited from interface org.apache.derby.iapi.sql.execute.ConstantAction
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT
-
-
Constructor Summary
Constructors Constructor and Description InsertConstantAction()Public niladic constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidexecuteConstantAction(Activation activation)NOP routine.intgetAutoGenColumn()Get the 0-based position of the autogenerated columnlonggetAutoincIncrement(int i)gets the increment value for a column.FormatableBitSetgetBaseRowReadList()int[]getBaseRowReadMap()java.lang.StringgetColumnName(int i)gets the name of the desired column in the taget table.longgetConglomerateId()Get the conglomerate id for the changed heap.java.lang.StringgetIndexNameFromCID(long indexCID)get the index name given the conglomerate id of the index.java.lang.String[]getIndexNames()java.lang.StringgetProperty(java.lang.String key)The the value of the specified key, if it exists, from the targetProperties.java.lang.StringgetSchemaName()Gets the name of the schema that the table is inint[]getStreamStorableHeapColIds()java.lang.StringgetTableName()Gets the name of the table being inserted intojava.util.PropertiesgetTargetProperties()Get the targetProperties from the constant action.intgetTypeFormatId()Get the formatID which corresponds to this class.booleanhasAutoincrement()Does the target table has autoincrement columns.voidreadExternal(java.io.ObjectInput in)Read this object from a stream of stored objects.booleanunderMerge()Return true if this is an action of a MERGE statementvoidwriteExternal(java.io.ObjectOutput out)Write this object to a stream of stored objects.
-
-
-
Constructor Detail
-
InsertConstantAction
public InsertConstantAction()
Public niladic constructor. Needed for Formatable interface to work.
-
-
Method Detail
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionRead this object from a stream of stored objects.- Specified by:
readExternalin interfacejava.io.Externalizable- Parameters:
in- read this.- Throws:
java.io.IOException- thrown on errorjava.lang.ClassNotFoundException- thrown on error
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionWrite this object to a stream of stored objects.- Specified by:
writeExternalin interfacejava.io.Externalizable- Parameters:
out- write bytes here.- Throws:
java.io.IOException- thrown on error
-
getAutoGenColumn
public int getAutoGenColumn()
Get the 0-based position of the autogenerated column
-
getSchemaName
public java.lang.String getSchemaName()
Gets the name of the schema that the table is in- Returns:
- schema name
-
getTableName
public java.lang.String getTableName()
Gets the name of the table being inserted into- Returns:
- name of table being inserted into
-
getColumnName
public java.lang.String getColumnName(int i)
gets the name of the desired column in the taget table.- Parameters:
i- the column number
-
getAutoincIncrement
public long getAutoincIncrement(int i)
gets the increment value for a column.- Parameters:
i- the column number
-
hasAutoincrement
public boolean hasAutoincrement()
Does the target table has autoincrement columns.- Returns:
- True if the table has ai columns
-
getTypeFormatId
public int getTypeFormatId()
Get the formatID which corresponds to this class.- Returns:
- the formatID of this class
-
executeConstantAction
public final void executeConstantAction(Activation activation) throws StandardException
NOP routine. The work is done in InsertResultSet.- Specified by:
executeConstantActionin interfaceConstantAction- Parameters:
activation- The execution environment for this constant action.- Throws:
StandardException- Thrown on failure- See Also:
ConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)
-
underMerge
public boolean underMerge()
Return true if this is an action of a MERGE statement
-
getConglomerateId
public long getConglomerateId()
Get the conglomerate id for the changed heap.- Returns:
- the conglomerate id.
-
getTargetProperties
public java.util.Properties getTargetProperties()
Get the targetProperties from the constant action.- Returns:
- The targetProperties
-
getProperty
public java.lang.String getProperty(java.lang.String key)
The the value of the specified key, if it exists, from the targetProperties.- Parameters:
key- The key to search for- Returns:
- The value for the specified key if it exists, otherwise null. (Return null if targetProperties is null.)
-
getBaseRowReadList
public FormatableBitSet getBaseRowReadList()
-
getBaseRowReadMap
public int[] getBaseRowReadMap()
-
getStreamStorableHeapColIds
public int[] getStreamStorableHeapColIds()
-
getIndexNameFromCID
public java.lang.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.
-
getIndexNames
public java.lang.String[] getIndexNames()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG