DatabaseDimension

class lsst.daf.butler.DatabaseDimension(name: str, *, required: NamedValueSet[Dimension], implied: NamedValueAbstractSet[Dimension], metadata_columns: NamedValueAbstractSet[IntColumnSpec | StringColumnSpec | FloatColumnSpec | HashColumnSpec | BoolColumnSpec], unique_keys: NamedValueAbstractSet[IntColumnSpec | StringColumnSpec | HashColumnSpec], implied_union_target: str | None, is_cached: bool, doc: str)

Bases: Dimension, DatabaseDimensionElement

A Dimension class that maps directly to a database table or query.

Parameters:
namestr

Name of the dimension.

requiredNamedValueSet [ Dimension ]

Other dimensions whose keys are part of the compound primary key for this dimension’s (logical) table, as well as references to their own tables. The required parameter does not include self (it can’t, of course), but the corresponding attribute does - it is added by the constructor.

impliedNamedValueAbstractSet [ Dimension ]

Other dimensions whose keys are included in this dimension’s (logical) table as foreign keys.

metadata_columnsNamedValueAbstractSet [ MetadataColumnSpec ]

Field specifications for all non-key fields in this dimension’s table.

unique_keysNamedValueAbstractSet [ KeyColumnSpec ]

Fields that can each be used to uniquely identify this dimension (given values for all required dimensions). The first of these is used as (part of) this dimension’s table’s primary key, while others are used to define unique constraints.

implied_union_targetstr or None

If not None, the name of an element whose implied values for this element form the set of allowable values.

is_cachedbool

Whether this element’s records should be persistently cached in the client.

docstr

Extended description of this element.

Notes

DatabaseDimension objects may belong to a TopologicalFamily, but it is the responsibility of DatabaseTopologicalFamilyConstructionVisitor to update the topology attribute of their members.

Attributes Summary

implied_union_target

If not None, another element whose implied values for this element form the set of allowable values.

required

Return the required dimensions.

unique_keys

Descriptions of unique identifiers for this dimension.

Attributes Documentation

implied_union_target
required
unique_keys