ForeignKeySpec#
- class lsst.daf.butler.ddl.ForeignKeySpec(table: str, source: tuple[str, ...], target: tuple[str, ...], onDelete: str | None = None, addIndex: bool = True)#
Bases:
objectDefinition of a foreign key constraint in a logical
Registrytable.Attributes Summary
If
True, create an index on the columns of this foreign key in the source table.SQL clause indicating how to handle deletes to the target table.
Tuple of source table column names.
Name of the target table.
Tuple of target table column names.
Methods Summary
fromConfig(config, *args, **kwargs)Attributes Documentation
- addIndex: bool = True#
If
True, create an index on the columns of this foreign key in the source table.
- onDelete: str | None = None#
SQL clause indicating how to handle deletes to the target table.
If not
None(which indicates that a constraint violation exception should be raised), should be either “SET NULL” or “CASCADE”.
- source: tuple[str, ...] = <dataclasses._MISSING_TYPE object>#
Tuple of source table column names.
- table: str = <dataclasses._MISSING_TYPE object>#
Name of the target table.
- target: tuple[str, ...] = <dataclasses._MISSING_TYPE object>#
Tuple of target table column names.
Methods Documentation