Class GenericConstantActionFactory
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.GenericConstantActionFactory
-
public class GenericConstantActionFactory extends java.lang.Object
Factory for creating ConstantActions.Implemetation note: For most operations, the ResultSetFactory determines if the operation is allowed in a readonly/target database. Because we perform JAR add/drop/replace with a utility rather than using normal language processing we never get a result set for these operations. For this reason, the ConstantActionFactory rather than the ResultSetFactory checks if the these operations are allowed.
-
-
Constructor Summary
Constructors Constructor Description GenericConstantActionFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintConstantAction
getAlterConstraintConstantAction(java.lang.String constraintName, java.lang.String constraintSchemaName, boolean[] characteristics, java.lang.String tableName, UUID tableId, java.lang.String tableSchemaName, IndexConstantAction indexAction)
Make ConstantAction to drop a constraint.ConstantAction
getAlterTableConstantAction(SchemaDescriptor sd, java.lang.String tableName, UUID tableId, long tableConglomerateId, int tableType, ColumnInfo[] columnInfo, ConstraintConstantAction[] constraintActions, char lockGranularity, boolean compressTable, int behavior, boolean sequential, boolean truncateTable, boolean purge, boolean defragment, boolean truncateEndOfTable, boolean updateStatistics, boolean updateStatisticsAll, boolean dropStatistics, boolean dropStatisticsAll, java.lang.String indexNameForStatistics)
Make the AlterAction for an ALTER TABLE statement.protected static Authorizer
getAuthorizer()
private static Context
getContext(java.lang.String contextID)
Privileged lookup of a Context.ConstantAction
getCreateAliasConstantAction(java.lang.String aliasName, java.lang.String schemaName, java.lang.String javaClassName, AliasInfo aliasInfo, char aliasType)
Make the ConstantAction for a CREATE ALIAS statement.CreateConstraintConstantAction
getCreateConstraintConstantAction(java.lang.String constraintName, int constraintType, boolean[] constraintCharacteristics, boolean forCreateTable, java.lang.String tableName, UUID tableId, java.lang.String schemaName, java.lang.String[] columnNames, IndexConstantAction indexAction, java.lang.String constraintText, ConstraintInfo otherConstraint, ProviderInfo[] providerInfo)
Make a ConstantAction for a constraint.IndexConstantAction
getCreateIndexConstantAction(boolean forCreateTable, boolean unique, boolean uniqueWithDuplicateNulls, boolean hasDeferrableChecking, boolean initiallyDeferred, int constraintType, java.lang.String indexType, java.lang.String schemaName, java.lang.String indexName, java.lang.String tableName, UUID tableId, java.lang.String[] columnNames, boolean[] isAscending, boolean isConstraint, UUID conglomerateUUID, java.util.Properties properties)
Make the ConstantAction for a CREATE INDEX statement.ConstantAction
getCreateRoleConstantAction(java.lang.String roleName)
Make the ConstantAction for a CREATE ROLE statement.ConstantAction
getCreateSchemaConstantAction(java.lang.String schemaName, java.lang.String aid)
Make the ConstantAction for a CREATE SCHEMA statement.ConstantAction
getCreateSequenceConstantAction(TableName sequenceName, DataTypeDescriptor dataType, long initialValue, long stepValue, long maxValue, long minValue, boolean cycle)
Make the ConstantAction for a CREATE SEQUENCE statement.ConstantAction
getCreateTableConstantAction(java.lang.String schemaName, java.lang.String tableName, int tableType, ColumnInfo[] columnInfo, CreateConstraintConstantAction[] constraintActions, java.util.Properties properties, char lockGranularity, boolean onCommitDeleteRows, boolean onRollbackDeleteRows)
Make the ConstantAction for a CREATE TABLE statement.ConstantAction
getCreateTriggerConstantAction(java.lang.String triggerSchemaName, java.lang.String triggerName, int eventMask, boolean isBefore, boolean isRow, boolean isEnabled, TableDescriptor triggerTable, UUID whenSPSId, java.lang.String whenText, UUID actionSPSId, java.lang.String actionText, UUID spsCompSchemaId, int[] referencedCols, int[] referencedColsInTriggerAction, java.lang.String originalWhenText, java.lang.String originalActionText, boolean referencingOld, boolean referencingNew, java.lang.String oldReferencingName, java.lang.String newReferencingName, ProviderInfo[] providerInfo)
Make the ConstantAction for a CREATE TRIGGER statement.ConstantAction
getCreateViewConstantAction(java.lang.String schemaName, java.lang.String tableName, int tableType, java.lang.String viewText, int checkOption, ColumnInfo[] columnInfo, ProviderInfo[] providerInfo, UUID compSchemaId)
Make the ConstantAction for a CREATE VIEW statement.ConstantAction
getDeleteConstantAction(long conglomId, int tableType, StaticCompiledOpenConglomInfo heapSCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, boolean deferred, boolean tableIsPublished, UUID tableID, int lockMode, java.lang.Object deleteToken, java.lang.Object keySignature, int[] keyPositions, long keyConglomId, java.lang.String schemaName, java.lang.String tableName, ResultDescription resultDescription, FKInfo[] fkInfo, TriggerInfo triggerInfo, FormatableBitSet baseRowReadList, int[] baseRowReadMap, int[] streamStorableHeapColIds, int numColumns, UUID dependencyId, boolean singleRowSource, ConstantAction[] dependentConstantActions, boolean underMerge)
Make the ConstantAction for a Replicated DELETE statement.ConstantAction
getDropAliasConstantAction(SchemaDescriptor sd, java.lang.String aliasName, char aliasType)
Make the ConstantAction for a DROP ALIAS statement.ConstraintConstantAction
getDropConstraintConstantAction(java.lang.String constraintName, java.lang.String constraintSchemaName, java.lang.String tableName, UUID tableId, java.lang.String tableSchemaName, IndexConstantAction indexAction, int behavior, int verifyType)
Make ConstantAction to drop a constraint.IndexConstantAction
getDropIndexConstantAction(java.lang.String fullIndexName, java.lang.String indexName, java.lang.String tableName, java.lang.String schemaName, UUID tableId, long tableConglomerateId)
Make the ConstantAction for a DROP INDEX statement.ConstantAction
getDropRoleConstantAction(java.lang.String roleName)
Make the ConstantAction for a DROP ROLE statement.ConstantAction
getDropSchemaConstantAction(java.lang.String schemaName)
Make the ConstantAction for a DROP SCHEMA statement.ConstantAction
getDropSequenceConstantAction(SchemaDescriptor sd, java.lang.String seqName)
Make the ConstantAction for a DROP SEQUENCE statement.ConstantAction
getDropStatisticsConstantAction(SchemaDescriptor sd, java.lang.String fullTableName, java.lang.String objectName, boolean forTable)
Make the constant action for Drop Statistics statement.ConstantAction
getDropTableConstantAction(java.lang.String fullTableName, java.lang.String tableName, SchemaDescriptor sd, long conglomerateNumber, UUID tableId, int behavior)
Make the ConstantAction for a DROP TABLE statement.ConstantAction
getDropTriggerConstantAction(SchemaDescriptor sd, java.lang.String triggerName, UUID tableId)
Make the ConstantAction for a DROP TRIGGER statement.ConstantAction
getDropViewConstantAction(java.lang.String fullTableName, java.lang.String tableName, SchemaDescriptor sd)
Make the ConstantAction for a DROP VIEW statement.ConstantAction
getGrantConstantAction(PrivilegeInfo privileges, java.util.List grantees)
Make the constant action for a Grant statementConstantAction
getGrantRoleConstantAction(java.util.List roleNames, java.util.List grantees)
Make the ConstantAction for a GRANT role statement.ConstantAction
getInsertConstantAction(TableDescriptor tableDescriptor, long conglomId, StaticCompiledOpenConglomInfo heapSCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, java.lang.String[] indexNames, boolean deferred, boolean tableIsPublished, boolean hasDeferrableChecks, UUID tableID, int lockMode, java.lang.Object insertToken, java.lang.Object rowSignature, java.util.Properties targetProperties, FKInfo[] fkInfo, TriggerInfo triggerInfo, int[] streamStorableHeapColIds, boolean[] indexedCols, UUID dependencyId, java.lang.Object[] stageControl, java.lang.Object[] ddlList, boolean singleRowSource, RowLocation[] autoincRowLocation, boolean underMerge, java.lang.String identitySequenceUUIDString)
Make the ConstantAction for a INSERT statement.ConstantAction
getLockTableConstantAction(java.lang.String fullTableName, long conglomerateNumber, boolean exclusiveMode)
Make the ConstantAction for a LOCK TABLE statement.ConstantAction
getMatchingClauseConstantAction(int clauseType, java.lang.String matchRefinementName, ResultDescription thenColumnSignature, java.lang.String rowMakingMethodName, java.lang.String resultSetFieldName, java.lang.String actionMethodName, ConstantAction thenAction)
Make the ConstantAction for a WHEN [ NOT ] MATCHED clause.MergeConstantAction
getMergeConstantAction(ConstantAction[] matchingClauses)
Make the ConstantAction for a MERGE statement.ConstantAction
getRenameConstantAction(java.lang.String fullTableName, java.lang.String tableName, java.lang.String oldObjectName, java.lang.String newObjectName, SchemaDescriptor sd, UUID tableId, boolean usedAlterTable, int renamingWhat)
Make the ConstantAction for a RENAME TABLE/COLUMN/INDEX statement.ConstantAction
getRevokeConstantAction(PrivilegeInfo privileges, java.util.List grantees)
Make the constant action for a Revoke statementConstantAction
getRevokeRoleConstantAction(java.util.List roleNames, java.util.List grantees)
Make the ConstantAction for a REVOKE role statement.ConstantAction
getSavepointConstantAction(java.lang.String savepointName, int statementType)
Make the ConstantAction for a savepoint statement (ROLLBACK savepoint, RELASE savepoint and SAVEPOINT).ConstantAction
getSetConstraintsConstantAction(java.util.List<TableName> constraints, boolean initiallyDeferred)
Get ConstantAction for SET CONSTRAINTS statement.ConstantAction
getSetRoleConstantAction(java.lang.String roleName, int type)
Make the ConstantAction for a SET ROLE statement.ConstantAction
getSetSchemaConstantAction(java.lang.String schemaName, int type)
Make the ConstantAction for a SET SCHEMA statement.ConstantAction
getSetTransactionIsolationConstantAction(int isolationLevel)
Make the ConstantAction for a SET TRANSACTION ISOLATION statement.ConstantAction
getUpdatableVTIConstantAction(int statementType, boolean deferred)
Make the ConstantAction for an updatable VTI statement.ConstantAction
getUpdatableVTIConstantAction(int statementType, boolean deferred, int[] changedColumnIds)
Make the ConstantAction for an updatable VTI statement.UpdateConstantAction
getUpdateConstantAction(TableDescriptor targetTableDesc, StaticCompiledOpenConglomInfo heapSCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, java.lang.String[] indexNames, boolean deferred, UUID targetUUID, int lockMode, boolean tableIsPublished, int[] changedColumnIds, int[] keyPositions, java.lang.Object updateToken, FKInfo[] fkInfo, TriggerInfo triggerInfo, FormatableBitSet baseRowReadList, int[] baseRowReadMap, int[] streamStorableHeapColIds, int numColumns, boolean positionedUpdate, boolean singleRowSource, RowLocation[] autoincRowLocation, boolean underMerge, java.lang.String identitySequenceUUIDString)
Make the ConstantAction for an UPDATE statement.
-
-
-
Method Detail
-
getSetConstraintsConstantAction
public ConstantAction getSetConstraintsConstantAction(java.util.List<TableName> constraints, boolean initiallyDeferred)
Get ConstantAction for SET CONSTRAINTS statement.- Parameters:
constraints
- The constraints to set, if null, set them ALL.initiallyDeferred
- ncodes IMMEDIATE (false), DEFERRED (true)
-
getAlterTableConstantAction
public ConstantAction getAlterTableConstantAction(SchemaDescriptor sd, java.lang.String tableName, UUID tableId, long tableConglomerateId, int tableType, ColumnInfo[] columnInfo, ConstraintConstantAction[] constraintActions, char lockGranularity, boolean compressTable, int behavior, boolean sequential, boolean truncateTable, boolean purge, boolean defragment, boolean truncateEndOfTable, boolean updateStatistics, boolean updateStatisticsAll, boolean dropStatistics, boolean dropStatisticsAll, java.lang.String indexNameForStatistics)
Make the AlterAction for an ALTER TABLE statement.- Parameters:
sd
- descriptor for the schema that table lives in.tableName
- Name of table.tableId
- UUID of table.tableConglomerateId
- heap conglomerate id of tabletableType
- Type of table (e.g., BASE).columnInfo
- Information on all the columns in the table.constraintActions
- ConstraintConstantAction[] for constraintslockGranularity
- The lock granularity.compressTable
- Whether or not this is a compress tablebehavior
- drop behavior of dropping columnsequential
- If compress table/drop column, whether or not sequentialtruncateTable
- Whether or not this is a truncate tablepurge
- PURGE during INPLACE COMPRESS?defragment
- DEFRAGMENT during INPLACE COMPRESS?truncateEndOfTable
- TRUNCATE END during INPLACE COMPRESS?updateStatistics
- TRUE means we are here to update statisticsupdateStatisticsAll
- TRUE means we are here to update statistics of all the indexes. False means we are here to update statistics of only one index.dropStatistics
- TRUE means we are here to drop statisticsdropStatisticsAll
- TRUE means we are here to drop statistics of all the indexes. False means we are here to drop statistics of only one index.indexNameForStatistics
- Will name the index whose statistics will be updated/dropped. This param is looked at only if updateStatisticsAll/dropStatisticsAll is set to false and updateStatistics/dropStatistics is set to true. .
-
getCreateConstraintConstantAction
public CreateConstraintConstantAction getCreateConstraintConstantAction(java.lang.String constraintName, int constraintType, boolean[] constraintCharacteristics, boolean forCreateTable, java.lang.String tableName, UUID tableId, java.lang.String schemaName, java.lang.String[] columnNames, IndexConstantAction indexAction, java.lang.String constraintText, ConstraintInfo otherConstraint, ProviderInfo[] providerInfo)
Make a ConstantAction for a constraint.- Parameters:
constraintName
- Constraint name.constraintType
- Constraint type.constraintCharacteristics
- Constraint characteristics, seeConstraintDefinitionNode.characteristics
forCreateTable
- True if for a CREATE TABLEtableName
- Table name.tableId
- UUID of table.schemaName
- Schema that table lives in.columnNames
- String[] for column namesindexAction
- IndexConstantAction for constraint (if necessary)constraintText
- Text for check constraintotherConstraint
- The referenced constraint, if a foreign key constraintproviderInfo
- Information on all the Providers
-
getCreateIndexConstantAction
public IndexConstantAction getCreateIndexConstantAction(boolean forCreateTable, boolean unique, boolean uniqueWithDuplicateNulls, boolean hasDeferrableChecking, boolean initiallyDeferred, int constraintType, java.lang.String indexType, java.lang.String schemaName, java.lang.String indexName, java.lang.String tableName, UUID tableId, java.lang.String[] columnNames, boolean[] isAscending, boolean isConstraint, UUID conglomerateUUID, java.util.Properties properties)
Make the ConstantAction for a CREATE INDEX statement.- Parameters:
forCreateTable
- Executed as part of a CREATE TABLEunique
- True means it will be a unique indexuniqueWithDuplicateNulls
- True means index check and disallow any duplicate key if key has no column with a null value. If any column in the key has a null value, no checking is done and insert will always succeed.hasDeferrableChecking
- True if the index is used to back a deferrable constraintinitiallyDeferred
- True means the deferrable constraint has deferred mode initially.constraintType
- The constraint typeindexType
- The type of index (BTREE, for example)schemaName
- the schema that table (and index) lives in.indexName
- Name of the indextableName
- Name of table the index will be ontableId
- UUID of table.columnNames
- Names of the columns in the index, in orderisAscending
- Array of booleans telling asc/desc on each columnisConstraint
- TRUE if index is backing up a constraint, else FALSEconglomerateUUID
- ID of conglomerateproperties
- The optional properties list associated with the index.
-
getCreateAliasConstantAction
public ConstantAction getCreateAliasConstantAction(java.lang.String aliasName, java.lang.String schemaName, java.lang.String javaClassName, AliasInfo aliasInfo, char aliasType)
Make the ConstantAction for a CREATE ALIAS statement.- Parameters:
aliasName
- Name of alias.schemaName
- Alias's schema.javaClassName
- Name of java class.aliasType
- The alias type
-
getCreateSchemaConstantAction
public ConstantAction getCreateSchemaConstantAction(java.lang.String schemaName, java.lang.String aid)
Make the ConstantAction for a CREATE SCHEMA statement.- Parameters:
schemaName
- Name of table.aid
- Authorizaton id
-
getCreateRoleConstantAction
public ConstantAction getCreateRoleConstantAction(java.lang.String roleName)
Make the ConstantAction for a CREATE ROLE statement.- Parameters:
roleName
- Name of role.
-
getSetRoleConstantAction
public ConstantAction getSetRoleConstantAction(java.lang.String roleName, int type)
Make the ConstantAction for a SET ROLE statement.- Parameters:
roleName
- Name of roletype
- Literal (== 0) or ? (== StatementType.SET_ROLE_DYNAMIC)
-
getCreateSequenceConstantAction
public ConstantAction getCreateSequenceConstantAction(TableName sequenceName, DataTypeDescriptor dataType, long initialValue, long stepValue, long maxValue, long minValue, boolean cycle)
Make the ConstantAction for a CREATE SEQUENCE statement.- Parameters:
sequenceName
- Name of sequence.dataType
-initialValue
-stepValue
-maxValue
-minValue
-cycle
-
-
getCreateTableConstantAction
public ConstantAction getCreateTableConstantAction(java.lang.String schemaName, java.lang.String tableName, int tableType, ColumnInfo[] columnInfo, CreateConstraintConstantAction[] constraintActions, java.util.Properties properties, char lockGranularity, boolean onCommitDeleteRows, boolean onRollbackDeleteRows)
Make the ConstantAction for a CREATE TABLE statement.- Parameters:
schemaName
- name for the schema that table lives in.tableName
- Name of table.tableType
- Type of table (e.g., BASE, global temporary table).columnInfo
- Information on all the columns in the table. (REMIND tableDescriptor ignored)constraintActions
- CreateConstraintConstantAction[] for constraintsproperties
- Optional table propertieslockGranularity
- The lock granularity.onCommitDeleteRows
- If true, on commit delete rows else on commit preserve rows of temporary table.onRollbackDeleteRows
- If true, on rollback, delete rows from temp tables which were logically modified. true is the only supported value
-
getSavepointConstantAction
public ConstantAction getSavepointConstantAction(java.lang.String savepointName, int statementType)
Make the ConstantAction for a savepoint statement (ROLLBACK savepoint, RELASE savepoint and SAVEPOINT).- Parameters:
savepointName
- name for the savepoint.statementType
- Type of savepoint statement ie rollback, release or set savepoint
-
getCreateViewConstantAction
public ConstantAction getCreateViewConstantAction(java.lang.String schemaName, java.lang.String tableName, int tableType, java.lang.String viewText, int checkOption, ColumnInfo[] columnInfo, ProviderInfo[] providerInfo, UUID compSchemaId)
Make the ConstantAction for a CREATE VIEW statement.- Parameters:
schemaName
- Name of the schema that table lives in.tableName
- Name of table.tableType
- Type of table (in this case TableDescriptor.VIEW_TYPE).viewText
- Text of query expression for view definitioncheckOption
- Check option typecolumnInfo
- Information on all the columns in the table.providerInfo
- Information on all the ProviderscompSchemaId
- ID of schema in which the view is to be bound when accessed in the future. (REMIND tableDescriptor ignored)
-
getDeleteConstantAction
public ConstantAction getDeleteConstantAction(long conglomId, int tableType, StaticCompiledOpenConglomInfo heapSCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, boolean deferred, boolean tableIsPublished, UUID tableID, int lockMode, java.lang.Object deleteToken, java.lang.Object keySignature, int[] keyPositions, long keyConglomId, java.lang.String schemaName, java.lang.String tableName, ResultDescription resultDescription, FKInfo[] fkInfo, TriggerInfo triggerInfo, FormatableBitSet baseRowReadList, int[] baseRowReadMap, int[] streamStorableHeapColIds, int numColumns, UUID dependencyId, boolean singleRowSource, ConstantAction[] dependentConstantActions, boolean underMerge) throws StandardException
Make the ConstantAction for a Replicated DELETE statement.- Parameters:
conglomId
- Conglomerate ID.tableType
- type of this tableheapSCOCI
- StaticCompiledOpenConglomInfo for heap.irgs
- Index descriptorsindexCIDS
- Conglomerate IDs of indicesindexSCOCIs
- StaticCompiledOpenConglomInfos for indexes.deferred
- True means deferred deletetableIsPublished
- true if table is publishedtableID
- table idlockMode
- The lock mode to use (row or table, see TransactionController)keySignature
- signature for the key(null for source)keyPositions
- positions of primary key columns in base rowkeyConglomId
- conglomerate id for the key (-1 for the souce)schemaName
- schemaName(null for source)tableName
- tableName(null for source)resultDescription
- A description of the columns in the row to be deleted. Only set in replication or during cascade Delete.fkInfo
- Array of structures containing foreign key info, if any (may be null)triggerInfo
- Array of structures containing trigger info, if any (may be null)numColumns
- Number of columns to readdependencyId
- UUID for dependency systembaseRowReadList
- Map of columns read in. 1 based.baseRowReadMap
- BaseRowReadMap[heapColId]->ReadRowColumnId.streamStorableHeapColIds
- Null for non rep. (0 based)singleRowSource
- Whether or not source is a single row sourceunderMerge
- True if this is an action of a MERGE statement.- Throws:
StandardException
- Thrown on failure
-
getDropConstraintConstantAction
public ConstraintConstantAction getDropConstraintConstantAction(java.lang.String constraintName, java.lang.String constraintSchemaName, java.lang.String tableName, UUID tableId, java.lang.String tableSchemaName, IndexConstantAction indexAction, int behavior, int verifyType)
Make ConstantAction to drop a constraint.- Parameters:
constraintName
- Constraint name.constraintSchemaName
- Constraint Schema NametableName
- Table name.tableId
- UUID of table.tableSchemaName
- the schema that table lives in.indexAction
- IndexConstantAction for constraint (if necessary)behavior
- The drop behavior (e.g. StatementType.RESTRICT)verifyType
- Verify that the constraint is of this type.
-
getAlterConstraintConstantAction
public ConstraintConstantAction getAlterConstraintConstantAction(java.lang.String constraintName, java.lang.String constraintSchemaName, boolean[] characteristics, java.lang.String tableName, UUID tableId, java.lang.String tableSchemaName, IndexConstantAction indexAction)
Make ConstantAction to drop a constraint.- Parameters:
constraintName
- Constraint name.constraintSchemaName
- Constraint Schema Namecharacteristics
- The presumably altered characteristicstableName
- Table name.tableId
- UUID of table.tableSchemaName
- The schema that table lives in.indexAction
- IndexConstantAction for constraint (if necessary)
-
getDropIndexConstantAction
public IndexConstantAction getDropIndexConstantAction(java.lang.String fullIndexName, java.lang.String indexName, java.lang.String tableName, java.lang.String schemaName, UUID tableId, long tableConglomerateId)
Make the ConstantAction for a DROP INDEX statement.- Parameters:
fullIndexName
- Fully qualified index nameindexName
- Index name.tableName
- The table nameschemaName
- Schema that index lives in.tableId
- UUID for tabletableConglomerateId
- heap conglomerate ID for table
-
getDropAliasConstantAction
public ConstantAction getDropAliasConstantAction(SchemaDescriptor sd, java.lang.String aliasName, char aliasType)
Make the ConstantAction for a DROP ALIAS statement.- Parameters:
aliasName
- Alias name.aliasType
- Alias type.
-
getDropRoleConstantAction
public ConstantAction getDropRoleConstantAction(java.lang.String roleName)
Make the ConstantAction for a DROP ROLE statement.- Parameters:
roleName
- role name to be dropped
-
getDropSequenceConstantAction
public ConstantAction getDropSequenceConstantAction(SchemaDescriptor sd, java.lang.String seqName)
Make the ConstantAction for a DROP SEQUENCE statement.- Parameters:
sd
- the schema the sequence object belongs toseqName
- name of sequence to be dropped
-
getDropSchemaConstantAction
public ConstantAction getDropSchemaConstantAction(java.lang.String schemaName)
Make the ConstantAction for a DROP SCHEMA statement.- Parameters:
schemaName
- Table name.
-
getDropTableConstantAction
public ConstantAction getDropTableConstantAction(java.lang.String fullTableName, java.lang.String tableName, SchemaDescriptor sd, long conglomerateNumber, UUID tableId, int behavior)
Make the ConstantAction for a DROP TABLE statement.- Parameters:
fullTableName
- Fully qualified table nametableName
- Table name.sd
- Schema that table lives in.conglomerateNumber
- Conglomerate number for heaptableId
- UUID for tablebehavior
- drop behavior, CASCADE, RESTRICT or DEFAULT
-
getDropViewConstantAction
public ConstantAction getDropViewConstantAction(java.lang.String fullTableName, java.lang.String tableName, SchemaDescriptor sd)
Make the ConstantAction for a DROP VIEW statement.- Parameters:
fullTableName
- Fully qualified table nametableName
- Table name.sd
- Schema that view lives in.
-
getRenameConstantAction
public ConstantAction getRenameConstantAction(java.lang.String fullTableName, java.lang.String tableName, java.lang.String oldObjectName, java.lang.String newObjectName, SchemaDescriptor sd, UUID tableId, boolean usedAlterTable, int renamingWhat)
Make the ConstantAction for a RENAME TABLE/COLUMN/INDEX statement.- Parameters:
fullTableName
- Fully qualified table nametableName
- Table name.oldObjectName
- Old object namenewObjectName
- New object name.sd
- Schema that table lives in.tableId
- UUID for tableusedAlterTable
- True if used Alter Table command, false if used RenamerenamingWhat
- Value indicates if Rename Column/Index.
-
getInsertConstantAction
public ConstantAction getInsertConstantAction(TableDescriptor tableDescriptor, long conglomId, StaticCompiledOpenConglomInfo heapSCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, java.lang.String[] indexNames, boolean deferred, boolean tableIsPublished, boolean hasDeferrableChecks, UUID tableID, int lockMode, java.lang.Object insertToken, java.lang.Object rowSignature, java.util.Properties targetProperties, FKInfo[] fkInfo, TriggerInfo triggerInfo, int[] streamStorableHeapColIds, boolean[] indexedCols, UUID dependencyId, java.lang.Object[] stageControl, java.lang.Object[] ddlList, boolean singleRowSource, RowLocation[] autoincRowLocation, boolean underMerge, java.lang.String identitySequenceUUIDString) throws StandardException
Make the ConstantAction for a INSERT statement.- Parameters:
conglomId
- Conglomerate ID.heapSCOCI
- StaticCompiledOpenConglomInfo for target heap.irgs
- Index descriptorsindexCIDS
- Conglomerate IDs of indicesindexSCOCIs
- StaticCompiledOpenConglomInfos for indexes.indexNames
- Names of indices on this table for error reporting.deferred
- True means deferred inserttableIsPublished
- true if table is published, false otherwisetableID
- table idhasDeferrableChecks
- The target table has deferrable CHECK constraintstargetProperties
- Properties on the target tablefkInfo
- Array of structures containing foreign key info, if any (may be null)triggerInfo
- Array of structures containing trigger info,streamStorableHeapColIds
- Null for non rep. (0 based) if any (may be null)indexedCols
- boolean[] of which (0-based) columns are indexed.dependencyId
- UUID for dependency systemstageControl
- Stage Control TokensddlList
- List of DDL to log. This is for BULK INSERT into a published table at the Source.singleRowSource
- Whether or not source is a single row sourceautoincRowLocation
- array of row locations into syscolumns for autoincrement columnsunderMerge
- True if this is an INSERT action of a MERGE statement.identitySequenceUUIDString
- For 10.11 and higher, the handle on the sequence for the identity column- Throws:
StandardException
- Thrown on failure
-
getUpdatableVTIConstantAction
public ConstantAction getUpdatableVTIConstantAction(int statementType, boolean deferred) throws StandardException
Make the ConstantAction for an updatable VTI statement.- Parameters:
statementType
- Statement type, cf.DeferModification.INSERT_STATEMENT
etc.deferred
- Deferred processing mode?- Throws:
StandardException
- Thrown on failure
-
getUpdatableVTIConstantAction
public ConstantAction getUpdatableVTIConstantAction(int statementType, boolean deferred, int[] changedColumnIds) throws StandardException
Make the ConstantAction for an updatable VTI statement.- Parameters:
statementType
- Statement type, cf.DeferModification.INSERT_STATEMENT
etc.deferred
- Deferred processing mode?changedColumnIds
- Array of ids of changed columns- Throws:
StandardException
- Thrown on failure
-
getLockTableConstantAction
public ConstantAction getLockTableConstantAction(java.lang.String fullTableName, long conglomerateNumber, boolean exclusiveMode)
Make the ConstantAction for a LOCK TABLE statement.- Parameters:
fullTableName
- Full name of the table.conglomerateNumber
- Conglomerate number for the heapexclusiveMode
- Whether or not to get an exclusive lock.
-
getSetSchemaConstantAction
public ConstantAction getSetSchemaConstantAction(java.lang.String schemaName, int type)
Make the ConstantAction for a SET SCHEMA statement.- Parameters:
schemaName
- Name of schema.type
- Literal, USER or ?
-
getSetTransactionIsolationConstantAction
public ConstantAction getSetTransactionIsolationConstantAction(int isolationLevel)
Make the ConstantAction for a SET TRANSACTION ISOLATION statement.- Parameters:
isolationLevel
- The new isolation level.
-
getUpdateConstantAction
public UpdateConstantAction getUpdateConstantAction(TableDescriptor targetTableDesc, StaticCompiledOpenConglomInfo heapSCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, java.lang.String[] indexNames, boolean deferred, UUID targetUUID, int lockMode, boolean tableIsPublished, int[] changedColumnIds, int[] keyPositions, java.lang.Object updateToken, FKInfo[] fkInfo, TriggerInfo triggerInfo, FormatableBitSet baseRowReadList, int[] baseRowReadMap, int[] streamStorableHeapColIds, int numColumns, boolean positionedUpdate, boolean singleRowSource, RowLocation[] autoincRowLocation, boolean underMerge, java.lang.String identitySequenceUUIDString) throws StandardException
Make the ConstantAction for an UPDATE statement.- Parameters:
targetTableDesc
- Descriptor for the updated tableheapSCOCI
- StaticCompiledOpenConglomInfo for heap.irgs
- Index descriptorsindexCIDS
- Conglomerate IDs of indicesindexSCOCIs
- StaticCompiledOpenConglomInfos for indexes.indexNames
-deferred
- True means deferred updatetargetUUID
- UUID of target tablelockMode
- The lock mode to use (row or table, see TransactionController)tableIsPublished
- true if table is published, false otherwisechangedColumnIds
- Array of ids of changes columnskeyPositions
- positions of primary key columns in base rowupdateToken
-fkInfo
- Array of structures containing foreign key info, if any (may be null)triggerInfo
- Array of structures containing trigger info,baseRowReadList
- Map of columns read in. 1 based.baseRowReadMap
- map of columns to be selected from the base row (partial row). 1 based.streamStorableHeapColIds
- Null for non rep. (0 based)numColumns
- The number of columns being read.positionedUpdate
- is this a positioned updatesingleRowSource
- Whether or not source is a single row sourceautoincRowLocation
- array of row locations into syscolumns for autoincrement columnsunderMerge
- True if this is an action of a MERGE statement.identitySequenceUUIDString
- For 10.11 and higher, the handle on the sequence for the identity column- Returns:
- The constant action constructed
- Throws:
StandardException
- Thrown on failure
-
getAuthorizer
protected static Authorizer getAuthorizer()
-
getCreateTriggerConstantAction
public ConstantAction getCreateTriggerConstantAction(java.lang.String triggerSchemaName, java.lang.String triggerName, int eventMask, boolean isBefore, boolean isRow, boolean isEnabled, TableDescriptor triggerTable, UUID whenSPSId, java.lang.String whenText, UUID actionSPSId, java.lang.String actionText, UUID spsCompSchemaId, int[] referencedCols, int[] referencedColsInTriggerAction, java.lang.String originalWhenText, java.lang.String originalActionText, boolean referencingOld, boolean referencingNew, java.lang.String oldReferencingName, java.lang.String newReferencingName, ProviderInfo[] providerInfo)
Make the ConstantAction for a CREATE TRIGGER statement.- Parameters:
triggerSchemaName
- Name of the schema that trigger lives in.triggerName
- Name of triggereventMask
- TriggerDescriptor.TRIGGER_EVENT_XXXXisBefore
- is this a before (as opposed to after) triggerisRow
- is this a row trigger or statement triggerisEnabled
- is this trigger enabled or disabledtriggerTable
- the table upon which this trigger is definedwhenSPSId
- the sps id for the when clause (may be null)whenText
- the text of the when clause (may be null)actionSPSId
- the spsid for the trigger action (may be null)actionText
- the text of the trigger action (may be null)spsCompSchemaId
- the compilation schema for the action and when spses. If null, will be set to the current default schemareferencedCols
- what columns does this trigger reference (may be null)referencedColsInTriggerAction
- what columns does the trigger action reference through old/new transition variables (may be null)originalWhenText
- The original user text of the WHEN clause (may be null)originalActionText
- The original user text of the trigger actionreferencingOld
- whether or not OLD appears in REFERENCING clausereferencingNew
- whether or not NEW appears in REFERENCING clauseoldReferencingName
- old referencing table name, if any, that appears in REFERCING clausenewReferencingName
- new referencing table name, if any, that appears in REFERCING clauseproviderInfo
- array of providers that the trigger depends on
-
getDropTriggerConstantAction
public ConstantAction getDropTriggerConstantAction(SchemaDescriptor sd, java.lang.String triggerName, UUID tableId)
Make the ConstantAction for a DROP TRIGGER statement.- Parameters:
sd
- Schema that stored prepared statement lives in.triggerName
- Name of the TriggertableId
- The table this trigger is defined upon
-
getDropStatisticsConstantAction
public ConstantAction getDropStatisticsConstantAction(SchemaDescriptor sd, java.lang.String fullTableName, java.lang.String objectName, boolean forTable)
Make the constant action for Drop Statistics statement.- Parameters:
sd
- Schema Descriptor of the schema in which the object resides.fullTableName
- full name of the object for which statistics are being dropped.objectName
- object name for which statistics are being dropped.forTable
- is it an index or table whose statistics aer being consigned to the garbage heap?
-
getGrantConstantAction
public ConstantAction getGrantConstantAction(PrivilegeInfo privileges, java.util.List grantees)
Make the constant action for a Grant statement- Parameters:
privileges
- The list of privileges to be grantedgrantees
- The list of grantees
-
getGrantRoleConstantAction
public ConstantAction getGrantRoleConstantAction(java.util.List roleNames, java.util.List grantees)
Make the ConstantAction for a GRANT role statement.- Parameters:
roleNames
- list of roles to be grantedgrantees
- list of authentication ids (user or roles) to which roles(s) are to be granted
-
getRevokeConstantAction
public ConstantAction getRevokeConstantAction(PrivilegeInfo privileges, java.util.List grantees)
Make the constant action for a Revoke statement- Parameters:
privileges
- The list of privileges to be revokeedgrantees
- The list of grantees
-
getRevokeRoleConstantAction
public ConstantAction getRevokeRoleConstantAction(java.util.List roleNames, java.util.List grantees)
Make the ConstantAction for a REVOKE role statement.- Parameters:
roleNames
- list of roles to be revokedgrantees
- list of authentication ids (user or roles) for whom roles are to be revoked
-
getMatchingClauseConstantAction
public ConstantAction getMatchingClauseConstantAction(int clauseType, java.lang.String matchRefinementName, ResultDescription thenColumnSignature, java.lang.String rowMakingMethodName, java.lang.String resultSetFieldName, java.lang.String actionMethodName, ConstantAction thenAction)
Make the ConstantAction for a WHEN [ NOT ] MATCHED clause.
-
getMergeConstantAction
public MergeConstantAction getMergeConstantAction(ConstantAction[] matchingClauses)
Make the ConstantAction for a MERGE statement.
-
getContext
private static Context getContext(java.lang.String contextID)
Privileged lookup of a Context. Must be private so that user code can't call this entry point.
-
-