ColumnTypeInfo

class lsst.daf.butler.ColumnTypeInfo(timespan_cls: type[lsst.daf.butler.timespan_database_representation.TimespanDatabaseRepresentation], universe: DimensionUniverse, dataset_id_spec: FieldSpec, run_key_spec: FieldSpec, ingest_date_dtype: type[lsst.daf.butler.ddl.AstropyTimeNsecTai] | type[sqlalchemy.sql.sqltypes.TIMESTAMP])

Bases: object

A struct that aggregates information about column types that can differ across data repositories due to Registry and dimension configuration.

Attributes Summary

ingest_date_pytype

Python type corresponding to ingest_date column type.

Methods Summary

make_relation_table_spec(columns[, unique_keys])

Create a specification for a table with the given relation columns.

Attributes Documentation

ingest_date_pytype

Python type corresponding to ingest_date column type.

Returns:
type

The Python type.

Methods Documentation

make_relation_table_spec(columns: Iterable[ColumnTag], unique_keys: Iterable[Iterable[ColumnTag]] = ()) TableSpec

Create a specification for a table with the given relation columns.

This is used primarily to create temporary tables for query results.

Parameters:
columnsIterable [ ColumnTag ]

Iterable of column identifiers.

unique_keysIterable [ Iterable [ ColumnTag ] ]

Unique constraints to add the table, as a nested iterable of (first) constraint and (second) the columns within that constraint.

Returns:
specddl.TableSpec

Specification for a table.