OnDeleteAction enum
ON DELETE policy for foreign-key columns. Maps
directly to SQLite's ON DELETE CASCADE / SET NULL / RESTRICT / NO ACTION clauses (and to EF Core's
OnDelete enum, for parity).
Values
- cascade → const OnDeleteAction
-
Cascade: when the parent row is deleted, the dependent rows are also deleted (recursively).
- setNull → const OnDeleteAction
-
Set null: when the parent row is deleted, the FK column on the dependent rows is set to
NULL. The column MUST be nullable. - restrict → const OnDeleteAction
-
Restrict: the DB rejects the
DELETEof the parent row if any dependent row references it. - noAction → const OnDeleteAction
-
No action (the default): no
ON DELETEclause is emitted. The DB uses its own default (which isNO ACTIONin SQLite).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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
Constants
-
values
→ const List<
OnDeleteAction> - A constant List of the values in this enum, in order of their declaration.