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

from_deserialized_object(obj)

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

to_json_serializable()

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

comparison_properties

iterable of the properties that will be used for comparison with another schema object of the same type

tables

return

list of the database’s table names

tables_schemas

return

the database tables and its schemas

type

the type of the schema component