ForeignKeyDefinition class

Declarative foreign key metadata.

Annotations
  • @immutable

Constructors

ForeignKeyDefinition({required String name, required List<String> columns, required String referencedTable, required List<String> referencedColumns, ReferenceAction onDelete = ReferenceAction.noAction, ReferenceAction onUpdate = ReferenceAction.noAction})
const
ForeignKeyDefinition.fromJson(Map<String, Object?> json)
factory

Properties

columns → List<String>
Columns participating in the constraint.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
Constraint name for the foreign key.
final
onDelete → ReferenceAction
Cascading action when the referenced row is deleted.
final
onUpdate → ReferenceAction
Cascading action when the referenced row is updated.
final
referencedColumns → List<String>
Columns on the referenced table.
final
referencedTable → String
Referenced table name.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({ReferenceAction? onDelete, ReferenceAction? onUpdate}) → ForeignKeyDefinition
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited