Tables¶
-
class
BinanceWatch.storage.tables.Table(name: str, columns_names: List[str], columns_sql_types: List[str], primary_key: Optional[str] = None, primary_key_sql_type: Optional[str] = None)[source]¶ This class represent a table in a database. All columns names are dynamic attributes @DynamicAttrs This class is used to describe the tables that will be used to in the database
-
__init__(name: str, columns_names: List[str], columns_sql_types: List[str], primary_key: Optional[str] = None, primary_key_sql_type: Optional[str] = None)[source]¶ Initialise a Table instance
- Parameters
name (str) – name of the table
columns_names (List[str]) – names of the columns (except primary column)
columns_sql_types (List[str]) – sql types of the previous columns
primary_key (Optional[str]) – name of the primary key (None, if no primary key is needed)
primary_key_sql_type (Optional[str]) – sql type of the primary key (None, if no primary key is needed)
-