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: - Constraint- Description of foreign key constraint. - Attributes Summary - If - Truethen this constraint will be declared as deferrable.- Constraint description. - Value for - INITIALLYclause, only used of- deferrableis True.- What to do when parent table columns are deleted. - What to do when parent table columns are updated. - Table referenced by this constraint. - Methods Summary - from_felis(dm_constr, columns)- Convert Felis constraint definition into instance of this class. - Attributes Documentation - 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_table¶
- Table referenced by this constraint. 
 - Methods Documentation - classmethod from_felis(dm_constr: Constraint, columns: Mapping[str, Column]) Constraint¶
- Convert Felis constraint definition into instance of this class. - Parameters:
- Returns:
- constraintConstraint
- Converted constraint definition. 
 
- constraint