Column

class lsst.dax.apdb.schema_model.Column(name: str, id: str, datatype: ~felis.datamodel.DataType | ~lsst.dax.apdb.schema_model.ExtraDataTypes, length: int | None = None, nullable: bool = True, value: ~typing.Any = None, autoincrement: bool | None = None, description: str | None = None, annotations: ~collections.abc.Mapping[str, ~typing.Any] = <factory>, table: ~lsst.dax.apdb.schema_model.Table | None = None)

Bases: object

Column representation in schema.

Attributes Summary

autoincrement

Unspecified value results in None.

description

Column description.

length

Optional length for string/binary columns

nullable

True for nullable columns.

table

Table which defines this column, usually not None.

value

Default value for column, can be None.

Methods Summary

clone()

Make a clone of self.

from_felis(dm_column)

Convert Felis column definition into instance of this class.

Attributes Documentation

autoincrement: bool | None = None

Unspecified value results in None.

description: str | None = None

Column description.

length: int | None = None

Optional length for string/binary columns

nullable: bool = True

True for nullable columns.

table: Table | None = None

Table which defines this column, usually not None.

value: Any = None

Default value for column, can be None.

Methods Documentation

clone() Column

Make a clone of self.

classmethod from_felis(dm_column: Column) Column

Convert Felis column definition into instance of this class.

Parameters:
dm_columnfelis.datamodel.Column

Felis column definition.

Returns:
columnColumn

Converted column definition.