LSST Applications g0603fd7c41+f1f8eaba91,g124d44cf3d+ce19972735,g180d380827+c1373eaf06,g1afd7665f7+eb25d4c773,g2079a07aa2+86d27d4dc4,g2305ad1205+aa3c8c93b6,g2bbee38e9b+44a02a0554,g337abbeb29+44a02a0554,g33d1c0ed96+44a02a0554,g3a166c0a6a+44a02a0554,g3d1719c13e+a4710a6d26,g487adcacf7+e387efc8c5,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+7f57e6be76,g858d7b2824+a4710a6d26,g991b906543+a4710a6d26,g99cad8db69+832a1c95fd,g9b9dfce982+e7b986f76c,g9ddcbc5298+9a081db1e4,ga1e77700b3+03d07e1c1f,gb0e22166c9+60f28cb32d,gb23b769143+a4710a6d26,gb3a676b8dc+e2510deafe,gba4ed39666+c2a2e4ac27,gbb8dafda3b+201573ceae,gbd998247f1+585e252eca,gc120e1dc64+7fb97cd961,gc28159a63d+44a02a0554,gc3e9b769f7+20d5ea8805,gcf0d15dbbd+e7b986f76c,gdaeeff99f8+f9a426f77a,ge79ae78c31+44a02a0554,ged0e8a7f67+8df1cf93fe,gee10cc3b42+585e252eca,w.2024.18
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.dax.apdb.schema_model.Column Class Reference

Public Member Functions

Column from_felis (cls, felis.datamodel.Column dm_column)
 
Column clone (self)
 

Static Public Attributes

str name
 
str id
 
DataTypes datatype
 
int length = None
 
bool nullable = True
 
Any value = None
 
bool autoincrement = None
 
str description = None
 
Mapping annotations = dataclasses.field(default_factory=dict)
 
Table table = None
 

Detailed Description

Column representation in schema.

Definition at line 70 of file schema_model.py.

Member Function Documentation

◆ clone()

Column lsst.dax.apdb.schema_model.Column.clone ( self)
Make a clone of self.

Definition at line 133 of file schema_model.py.

133 def clone(self) -> Column:
134 """Make a clone of self."""
135 return dataclasses.replace(self, table=None)
136
137
138@dataclasses.dataclass

◆ from_felis()

Column lsst.dax.apdb.schema_model.Column.from_felis ( cls,
felis.datamodel.Column dm_column )
Convert Felis column definition into instance of this class.

Parameters
----------
dm_column : `felis.datamodel.Column`
    Felis column definition.

Returns
-------
column : `Column`
    Converted column definition.

Definition at line 104 of file schema_model.py.

104 def from_felis(cls, dm_column: felis.datamodel.Column) -> Column:
105 """Convert Felis column definition into instance of this class.
106
107 Parameters
108 ----------
109 dm_column : `felis.datamodel.Column`
110 Felis column definition.
111
112 Returns
113 -------
114 column : `Column`
115 Converted column definition.
116 """
117 column = cls(
118 name=dm_column.name,
119 id=dm_column.id,
120 datatype=dm_column.datatype,
121 length=dm_column.length,
122 value=dm_column.value,
123 description=dm_column.description,
124 nullable=dm_column.nullable if dm_column.nullable is not None else True,
125 autoincrement=dm_column.autoincrement,
126 annotations=_strip_keys(
127 dict(dm_column),
128 ["name", "id", "datatype", "length", "nullable", "value", "autoincrement", "description"],
129 ),
130 )
131 return column
132

Member Data Documentation

◆ annotations

Mapping lsst.dax.apdb.schema_model.Column.annotations = dataclasses.field(default_factory=dict)
static

Definition at line 97 of file schema_model.py.

◆ autoincrement

bool lsst.dax.apdb.schema_model.Column.autoincrement = None
static

Definition at line 91 of file schema_model.py.

◆ datatype

DataTypes lsst.dax.apdb.schema_model.Column.datatype
static

Definition at line 79 of file schema_model.py.

◆ description

str lsst.dax.apdb.schema_model.Column.description = None
static

Definition at line 94 of file schema_model.py.

◆ id

str lsst.dax.apdb.schema_model.Column.id
static

Definition at line 76 of file schema_model.py.

◆ length

int lsst.dax.apdb.schema_model.Column.length = None
static

Definition at line 82 of file schema_model.py.

◆ name

str lsst.dax.apdb.schema_model.Column.name
static

Definition at line 73 of file schema_model.py.

◆ nullable

bool lsst.dax.apdb.schema_model.Column.nullable = True
static

Definition at line 85 of file schema_model.py.

◆ table

Table lsst.dax.apdb.schema_model.Column.table = None
static

Definition at line 100 of file schema_model.py.

◆ value

Any lsst.dax.apdb.schema_model.Column.value = None
static

Definition at line 88 of file schema_model.py.


The documentation for this class was generated from the following file: