ForeignKeySpec¶
- 
class lsst.daf.butler.ForeignKeySpec(table: str, source: Tuple[str, ...], target: Tuple[str, ...], onDelete: Optional[str] = None)¶
- Bases: - object- A struct-like class used to define a foreign key constraint in a logical Registry table. - Attributes Summary - onDelete- SQL clause indicating how to handle deletes to the target table. - Methods Summary - fromConfig(config, *args, **kwds)- toSqlAlchemy(tableName, schema)- Construct a SQLAlchemy - ForeignKeyConstraintcorresponding to this specification.- Attributes Documentation - 
onDelete= None¶
- SQL clause indicating how to handle deletes to the target table. - If not - None, should be either “SET NULL” or “CASCADE”.
 - Methods Documentation - 
classmethod fromConfig(config, *args, **kwds)¶
 - 
toSqlAlchemy(tableName: str, schema: lsst.daf.butler.core.schema.Schema) → sqlalchemy.sql.schema.ForeignKeyConstraint¶
- Construct a SQLAlchemy - ForeignKeyConstraintcorresponding to this specification.- Parameters: - Returns: - constraint : sqlalchemy.ForeignKeyConstraint
- SQLAlchemy version of the foreign key constraint. 
 
- constraint : 
 
-