ForeignKeySpec¶
- class lsst.daf.butler.ddl.ForeignKeySpec(table: str, source: tuple[str, ...], target: tuple[str, ...], onDelete: str | None = None, addIndex: bool = True)¶
- Bases: - object- Definition 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. - 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”.
 - Methods Documentation