zut.sql.ForeignKey
- class zut.sql.ForeignKey(related_table: Identifier, columns: Mapping[str, str | ForeignKey] | Sequence[str] | str, *, basename: str | None = None)
Bases:
object- __init__(related_table: Identifier, columns: Mapping[str, str | ForeignKey] | Sequence[str] | str, *, basename: str | None = None)
Methods
__init__(related_table, columns, *[, basename])Attributes
Base name of the foreign Key.
suffixesRelated table of the foreign key.
Association of the source columns (e.g. 'basename_id1' and 'basename_id2') to the matching primary key in the related table.
- property basename: str | None
Base name of the foreign Key. This is normally the name of the field(s) without the _id or _pk suffix.
- columns: Mapping[str, str | ForeignKey]
Association of the source columns (e.g. ‘basename_id1’ and ‘basename_id2’) to the matching primary key in the related table.
Related table of the foreign key.