Index#

class lsst.dax.apdb.schema_model.Index(name: str, id: str, columns: list[~lsst.dax.apdb.schema_model.Column] = <factory>, expressions: list[str] = <factory>, description: str | None = None, annotations: ~collections.abc.Mapping[str, ~typing.Any] = <factory>)#

Bases: object

Index representation.

Attributes Summary

annotations

Additional annotations for this index.

columns

List of columns in index, one of the columns or expressions must be non-empty.

description

Index description.

expressions

List of expressions in index, one of the columns or expressions must be non-empty.

id

Felis ID for this index.

name

index name, can be empty.

Methods Summary

from_felis(dm_index, columns)

Convert Felis index definition into instance of this class.

Attributes Documentation

annotations: Mapping[str, Any] = <dataclasses._MISSING_TYPE object>#

Additional annotations for this index.

columns: list[Column] = <dataclasses._MISSING_TYPE object>#

List of columns in index, one of the columns or expressions must be non-empty.

description: str | None = None#

Index description.

expressions: list[str] = <dataclasses._MISSING_TYPE object>#

List of expressions in index, one of the columns or expressions must be non-empty.

id: str = <dataclasses._MISSING_TYPE object>#

Felis ID for this index.

name: str = <dataclasses._MISSING_TYPE object>#

index name, can be empty.

Methods Documentation

classmethod from_felis(dm_index: Index, columns: Mapping[str, Column]) Index#

Convert Felis index definition into instance of this class.

Parameters#

dm_indexfelis.datamodel.Index

Felis index definition.

columnsMapping [str, Column]

Mapping of column ID to Column instance.

Returns#

indexIndex

Converted index definition.