PgTriggerContext
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Owns trigger metadata and detached OLD and NEW row values independently of PostgreSQL memory contexts. Transition table names remain owned strings, but the tables can only be queried during the trigger invocation.
public sealed class PgTriggerContextInheritance: object
Properties
Section titled “Properties”Arguments
Section titled “Arguments”Gets the immutable trigger arguments in declaration order, including empty strings.
public IReadOnlyList<string> Arguments { get; }Value: IReadOnlyList<string>
ConstraintOid
Section titled “ConstraintOid”Gets the OID of the constraint a constraint trigger implements, or zero for an ordinary trigger.
public uint ConstraintOid { get; }Value: uint
Descriptor
Section titled “Descriptor”Gets the immutable target relation descriptor, including physical dropped slots.
public PgTupleDescriptor Descriptor { get; }Value: PgTupleDescriptor
Gets PostgreSQL’s raw trigger event bits, retaining internal deferrability flags.
public uint Event { get; }Value: uint
IsDeferrable
Section titled “IsDeferrable”Gets whether the constraint trigger is deferrable.
public bool IsDeferrable { get; }Value: bool
IsInitiallyDeferred
Section titled “IsInitiallyDeferred”Gets whether the constraint trigger is initially deferred until transaction commit.
public bool IsInitiallyDeferred { get; }Value: bool
Gets whether this invocation operates on one row or the entire statement.
public PgTriggerLevel Level { get; }Value: PgTriggerLevel
Gets the exact name of the trigger that fired.
public string Name { get; }Value: string
Gets the owned proposed row for row-level INSERT and UPDATE invocations, otherwise null. Undefined generated columns are marked unavailable instead of being exposed as SQL NULL.
public PgHeapTuple? New { get; }Value: PgHeapTuple
NewTransitionTableName
Section titled “NewTransitionTableName”Gets the NEW transition relation name, or null when none was declared. The relation itself is only available during the trigger callback.
public string? NewTransitionTableName { get; }Value: string
Gets the owned original row for row-level UPDATE and DELETE invocations, otherwise null.
public PgHeapTuple? Old { get; }Value: PgHeapTuple
OldTransitionTableName
Section titled “OldTransitionTableName”Gets the OLD transition relation name, or null when none was declared. The relation itself is only available during the trigger callback.
public string? OldTransitionTableName { get; }Value: string
Operation
Section titled “Operation”Gets the single operation that caused this invocation.
public PgTriggerOperation Operation { get; }Value: PgTriggerOperation
RelationOid
Section titled “RelationOid”Gets the target relation’s catalog OID, distinct from its row type OID.
public uint RelationOid { get; }Value: uint
TableName
Section titled “TableName”Gets the exact target table or view name.
public string TableName { get; }Value: string
TableSchema
Section titled “TableSchema”Gets the exact target relation’s schema name.
public string TableSchema { get; }Value: string
Timing
Section titled “Timing”Gets whether this invocation runs before, after, or instead of the operation.
public PgTriggerTiming Timing { get; }Value: PgTriggerTiming
TriggerOid
Section titled “TriggerOid”Gets the fired trigger’s catalog OID.
public uint TriggerOid { get; }Value: uint
UpdateOfColumns
Section titled “UpdateOfColumns”Gets the zero-based ordinals of the columns named by the trigger’s UPDATE OF list, or an empty list when the
trigger is not column-specific.
public IReadOnlyList<int> UpdateOfColumns { get; }Value: IReadOnlyList<int>
UpdatedColumns
Section titled “UpdatedColumns”Gets the zero-based ordinals of the columns the triggering UPDATE assigns, or null for other operations.
A column can be assigned its current value; compare Old and New to find changed values.
public IReadOnlyList<int>? UpdatedColumns { get; }Value: IReadOnlyList<int>