TableSpec¶
- class lsst.daf.butler.ddl.TableSpec(fields: Iterable[FieldSpec], *, unique: Iterable[tuple[str, ...]] = (), indexes: Iterable[IndexSpec] = (), foreignKeys: Iterable[ForeignKeySpec] = (), exclusion: Iterable[tuple[str | type[TimespanDatabaseRepresentation], ...]] = (), recycleIds: bool = True, doc: str | None = None)¶
Bases:
objectA data class used to define a table or table-like query interface.
- Parameters:
- fields
Iterable[FieldSpec] Specifications for the columns in this table.
- unique
Iterable[tuple[str] ], optional Non-primary-key unique constraints for the table.
- indexes
Iterable[IndexSpec], optional Indexes for the table.
- foreignKeys
Iterable[ForeignKeySpec], optional Foreign key constraints for the table.
- exclusion
Iterable[tuple[strortype] ] Special constraints that prohibit overlaps between timespans over rows where other columns are equal. These take the same form as unique constraints, but each tuple may contain a single
TimespanDatabaseRepresentationsubclass representing a timespan column.- recycleIds
bool, optional If
True, allow databases that might normally recycle autoincrement IDs to do so (usually better for performance) on any autoincrement field in this table.- doc
str, optional Documentation for the table.
- fields
Attributes Summary
Documentation for the table.
If
True, allow databases that might normally recycle autoincrement IDs to do so (usually better for performance) on any autoincrement field in this table.Methods Summary
fromConfig(config, *args, **kwargs)Attributes Documentation
- recycleIds: bool = True¶
If
True, allow databases that might normally recycle autoincrement IDs to do so (usually better for performance) on any autoincrement field in this table.
Methods Documentation