Table

pydantic model felis.datamodel.Table

Table model.

Parameters:

data (Any)

Fields:
Validators:
field columns: Sequence[Column] [Required]

Columns in the table.

Validated by:
field constraints: list[_ConstraintType] [Optional]

Constraints on the table.

Validated by:
field indexes: list[Index] [Optional]

Indexes on the table.

Validated by:
field mysql_charset: str | None = None (alias 'mysql:charset')

MySQL charset to use for the table.

Validated by:
field mysql_engine: str | None = 'MyISAM' (alias 'mysql:engine')

MySQL engine to use for the table.

Validated by:
field primary_key: str | list[str] | None = None (alias 'primaryKey')

Primary key of the table.

Validated by:
field tap_table_index: int | None = None (alias 'tap:table_index')

IVOA TAP_SCHEMA table index of the table.

Validated by:
validator check_tap_principal  »  all fields

Check that at least one column is flagged as ‘principal’ for TAP purposes.

Parameters:

info (ValidationInfo) – Validation context used to determine if the check is enabled.

Returns:

The table being validated.

Return type:

Table

Raises:

ValueError – Raised if the table is missing a column flagged as ‘principal’.

validator check_tap_table_index  »  all fields

Check that the table has a TAP table index.

Parameters:

info (ValidationInfo) – Validation context used to determine if the check is enabled.

Returns:

The table being validated.

Return type:

Table

Raises:

ValueError – Raised If the table is missing a TAP table index.

validator check_unique_column_names  »  columns

Check that column names are unique.

Parameters:

columns (list[Column]) – The columns to check.

Returns:

The columns if they are unique.

Return type:

list [ Column ]

Raises:

ValueError – Raised if column names are not unique.