aito.schema.AitoDatabaseSchema¶
-
class
aito.schema.
AitoDatabaseSchema
(tables: Dict[str, aito.schema.AitoTableSchema])¶ Aito Database Schema
Can be thought of as a dict-like container for AitoTableSchema objects
- Parameters
typ (str) – the type of the schema component
Methods
add_column
(table_name, table_schema)add a column to the table schema
create an AitoSchema object from a JSON deserialized object
from_json_string
(json_string, **kwargs)create an AitoSchema object from a JSON string
get_linked_columns
(table_name)return the columns name of the linked table of a table
has_table
(table_name)check if the database has the specified table
convert the AitoSchema object to a json serializable object (dict, in most case)
to_json_string
(**kwargs)the AitoSchema object as a JSON string
Attributes
iterable of the properties that will be used for comparison with another schema object of the same type
- return
list of the database’s table names
- return
the database tables and its schemas
the type of the schema component