CassandraColumn¶
The CassandraColumn
represents the columns of Cassandra tables.
Import¶
from primeight import CassandraColumn
Constructor github¶
- name
str
[Required]: Column name. - type_handle
str
[Required]: Column type. - alias
str
(Default:None
): A different name to identify the column. - description
str
(Default:None
): Column description. - min_value
int or float
(Default:None
): Minimum value that column can have. - max_value
int or float
(Default:None
): Maximum value that column can have.
Attributes¶
name¶
Type: str
Column name.
type¶
Type: str
Column type.
alias¶
Type: str
A different name to identify the column.
description¶
Type: str
Column description.
min_value¶
Type: int or float
Minimum value that column can have.
max_value¶
Type: int or float
Minimum value that column can have.
Methods¶
pydantic_type¶
Column Pydantic type.
Parameters:
- handle
str
(Default:None
) Column type handler. If set toNone
,CassandraColumn.type
is used. This parameter is mostly used internally.
Return: Any
cassandra_type¶
Cassandra column type.
Parameters:
- handle
str
(Default:None
) Column type handler. If set toNone
,CassandraColumn.type
is used. This parameter is mostly used internally. - frozen
bool
(Default:True
) Whether the column should be frozen or not.
Return: str
is_valid¶
Validate value according to the maximum and minimum values of the column.
Parameters:
- value
int or float
[Required]: Value to validate Return:bool