ForeignKeyConstraint#
- class lsst.dax.apdb.schema_model.ForeignKeyConstraint(name: str | None, id: str, deferrable: bool = False, initially: str | None = None, description: str | None = None, annotations: ~collections.abc.Mapping[str, ~typing.Any] = <factory>, columns: list[~lsst.dax.apdb.schema_model.Column] = <factory>, referenced_columns: list[~lsst.dax.apdb.schema_model.Column] = <factory>, onupdate: str | None = None, ondelete: str | None = None)#
Bases:
ConstraintDescription of foreign key constraint.
Attributes Summary
Additional annotations for this constraint.
List of columns in this constraint, all columns belong to the same table as the constraint itself.
If
Truethen this constraint will be declared as deferrable.Constraint description.
Felis ID for this constraint.
Value for
INITIALLYclause, only used ofdeferrableis True.Constraint name.
What to do when parent table columns are deleted.
What to do when parent table columns are updated.
List of referenced columns, the number of columns must be the same as in
Constraint.columnslist.Table referenced by this constraint.
Attributes Documentation
- annotations: Mapping[str, Any] = <dataclasses._MISSING_TYPE object>#
Additional annotations for this constraint.
- columns: list[Column] = <dataclasses._MISSING_TYPE object>#
List of columns in this constraint, all columns belong to the same table as the constraint itself.
- deferrable: bool = False#
If
Truethen this constraint will be declared as deferrable.
- description: str | None = None#
Constraint description.
- id: str = <dataclasses._MISSING_TYPE object>#
Felis ID for this constraint.
- initially: str | None = None#
Value for
INITIALLYclause, only used ofdeferrableis True.
- name: str | None = <dataclasses._MISSING_TYPE object>#
Constraint name.
- ondelete: str | None = None#
What to do when parent table columns are deleted. Typical values are CASCADE, DELETE and RESTRICT.
- onupdate: str | None = None#
What to do when parent table columns are updated. Typical values are CASCADE, DELETE and RESTRICT.
- referenced_columns: list[Column] = <dataclasses._MISSING_TYPE object>#
List of referenced columns, the number of columns must be the same as in
Constraint.columnslist. All columns must belong to the same table, which is different from the table of this constraint.
- referenced_table#
Table referenced by this constraint.