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: - object- A data class used to define a table or table-like query interface. - Parameters:
- fieldsIterable[FieldSpec]
- Specifications for the columns in this table. 
- uniqueIterable[tuple[str] ], optional
- Non-primary-key unique constraints for the table. 
- indexes: `~collections.abc.Iterable` [ `IndexSpec` ], optional
- Indexes for the table. 
- foreignKeysIterable[ForeignKeySpec], optional
- Foreign key constraints for the table. 
- exclusionIterable[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.
- recycleIdsbool, 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.
- docstr, 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