21 namespace Deveel.Data.Sql.Triggers {
48 if (triggerInfo == null)
49 throw new ArgumentNullException(
"triggerInfo");
87 NotifyTriggerEvent(context, tableEvent);
89 ExecuteProcedure(context);
94 throw new NotImplementedException();
98 var tableName = tableEvent.
Table.FullName;
110 var tableName = context.
Table.TableInfo.TableName;
120 var stateHandler = (ITableStateHandler) transaction;
121 var oldState = stateHandler.TableState;
125 stateHandler.SetTableState(newState);
128 FireTrigger(context, tableEvent);
130 stateHandler.SetTableState(oldState);
133 FireTrigger(context, tableEvent);
Defines the information about a trigger on a table of the database, such as the event on which is fir...
Trigger(TriggerInfo triggerInfo)
Constructs a trigger with the given information.
TriggerEventType
The different types of high layer trigger events.
ITable Table
Gets the table on which the event occurred.
Represents a database object, such as a table, a trigger, a type or a column.
ObjectName FullName
Gets the fully qualified name of the object used to resolve it uniquely within the database...
void FireTrigger(IQuery context, TableEvent tableEvent)
Describes the name of an object within a database.
ITransaction Transaction
Gets the instance of ITransaction that handles the transactional operations of this session...
override bool Equals(object obj)
bool CanInvoke(TableEvent context)
TriggerEventType EventType
Gets the modification event on the attached table at which to fire the trigger.
ObjectName TriggerName
Gets the fully qualified name of the trigger.
void NotifyTriggerEvent(IQuery context, TableEvent tableEvent)
TriggerType
Enumerates the types of triggers, that can be volatile (like the Callback) or stored in the database...
RowId OldRowId
Gets an optional reference to a row removed or updated.
TriggerEventType EventType
Gets the type of event that occurred on the table.
DbObjectType ObjectType
Gets the type of database object that the implementation is for
Exposes the context of an event fired on a table.
ObjectName TableName
Gets the fully qualified name of the database table on which to attach the trigger.
void Invoke(IQuery context, TableEvent tableEvent)
Represents an event fired at a given modification event (either INSERT, DELETE or UPDATE) at a given ...
Row NewRow
Gets the row object being added or updated.
DbObjectType
The kind of objects that can be handled by a database system and its managers
TriggerType TriggerType
Gets the type of trigger.
void ExecuteProcedure(IQuery context)