Trigger class
A sqlite trigger that's executed before, after or instead of a subset of
writes on a specific tables.
In drift, triggers can only be declared in .drift
files.
For more information on triggers, see the CREATE TRIGGER documentation from sqlite, or the entry on sqlitetutorial.net.
- Inheritance
-
- Object
- DatabaseSchemaEntity
- Trigger
Constructors
- Trigger(String createTriggerStmt, String entityName)
-
Creates a trigger representation by the
createTriggerStmt
and itsentityName
. Mainly used by generated code. -
Trigger.byDialect(String entityName, Map<
SqlDialect, String> createStatementsByDialect) -
Creates the trigger model from its
entityName
in the schema and allcreateStatementsByDialect
for the supported dialects.
Properties
-
createStatementsByDialect
→ Map<
SqlDialect, String> -
The
CREATE TRIGGER
SQL statements used to create this trigger, accessible for each dialect enabled when generating code.final - createTriggerStmt → String
-
The
CREATE TRIGGER
sql statement that can be used to create this trigger.no setter - entityName → String
-
The (unalised) name of this entity in the database.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited