Column¶
- pydantic model felis.datamodel.Column¶
Column model.
- Parameters:
data (
Any
)- Fields:
- Validators:
check_length
»all fields
check_precision
»all fields
check_redundant_datatypes
»all fields
check_units
»all fields
check_value
»all fields
- field autoincrement: bool | None = None¶
Whether the column is autoincremented.
- field datatype: DataType [Required]¶
Datatype of the column.
- field fits_tunit: str | None = None (alias 'fits:tunit')¶
FITS TUNIT of the column.
- field ivoa_ucd: str | None = None (alias 'ivoa:ucd')¶
IVOA UCD of the column.
- field ivoa_unit: str | None = None (alias 'ivoa:unit')¶
IVOA unit of the column.
- field length: int | None = None¶
Length of the column.
- Constraints:
gt = 0
- Validated by:
- field mysql_datatype: str | None = None (alias 'mysql:datatype')¶
MySQL datatype override on the column.
- field nullable: bool = True¶
Whether the column can be
NULL
.
- field postgresql_datatype: str | None = None (alias 'postgresql:datatype')¶
PostgreSQL datatype override on the column.
- field precision: int | None = None¶
The numerical precision of the column.
For timestamps, this is the number of fractional digits retained in the seconds field.
- Constraints:
ge = 0
- Validated by:
- field tap_column_index: int | None = None (alias 'tap:column_index')¶
TAP_SCHEMA column index of the column.
- field tap_principal: int | None = 0 (alias 'tap:principal')¶
Whether this is a TAP_SCHEMA principal column.
- Constraints:
ge = 0
le = 1
- Validated by:
- field tap_std: int | None = 0 (alias 'tap:std')¶
TAP_SCHEMA indication that this column is defined by an IVOA standard.
- Constraints:
ge = 0
le = 1
- Validated by:
- field value: str | int | float | bool | None = None¶
Default value of the column.
- field votable_arraysize: int | str | None = None (alias 'votable:arraysize')¶
VOTable arraysize of the column.
- field votable_datatype: str | None = None (alias 'votable:datatype')¶
VOTable datatype of the column.
- field votable_xtype: str | None = None (alias 'votable:xtype')¶
VOTable xtype (extended type) of the column.
- validator check_length » all fields¶
Check that a valid length is provided for sized types.
- validator check_precision » all fields¶
Check that precision is only valid for timestamp columns.
- Returns:
The column being validated.
- Return type:
- validator check_redundant_datatypes » all fields¶
Check for redundant datatypes on columns.
- Parameters:
info (
ValidationInfo
) – Validation context used to determine if the check is enabled.- Returns:
The column being validated.
- Return type:
- Raises:
ValueError – Raised if a datatype override is redundant.
- validator check_units » all fields¶
Check that the
fits:tunit
orivoa:unit
field has valid units according to astropy. Only one may be provided.- Returns:
The column being validated.
- Return type:
- Raises:
ValueError – Raised If both FITS and IVOA units are provided, or if the unit is invalid.