The Domain Class

Domain is a Python module dedicated to generation of various SQL required for manipulation with data in certain knowledge domain

See

class Domain(spec, name)[source]
CREATE = 'CREATE TABLE {flag} {name}'
set_sloppy()[source]
create_table(name) str[source]
init() None[source]
list_columns(table) list[source]
list_source_columns(table) list[source]
has_hard_linked_children(table) bool[source]
has(key: str) bool[source]
get(key: str) Optional[str][source]
fqn(table)[source]
ufqn(table)[source]
find(table: str, root=None) Optional[dict][source]
find_dependent(table: str) Dict[source]
drop(table, connection) list[source]
spillover_table(table, definition)[source]
append_ddl(table: str, ddl: str)[source]
skip(table: str)[source]
classmethod get_select_from(definition) Optional[List[Identifier]][source]
add_column_indices(table: str, columns: List)[source]
ddl_for_node(node, parent=None) None[source]
add_multi_column_indices(table: str, definition: Dict)[source]
generate_insert_from_select(table: str, limit: Optional[int] = None) str[source]
create_object_from(table, definition, features, obj_type) str[source]
map_selected_columns(selected_columns: List[Identifier], cdef: Dict, pdef: Dict) List[Dict][source]
create_true_table(table, features) str[source]
need_index(column) bool[source]
get_index_ddl(table, column) -> (<class 'str'>, <class 'bool'>)[source]
add_index_by_ddl(table: str, ddl: str)[source]
get_multi_column_index_ddl(table: str, name: str, definition: dict) str[source]
add_index(table: str, name: str, definition: dict)[source]
static is_array(column) bool[source]
static is_generated(column)[source]
extract_generation_code(column, other_columns, qualifier)[source]
static get_column_type(column) str[source]
static has_column_spec(column) bool[source]
column_spec(column) str[source]
view_column_spec(column, table, table_fqn) str[source]
find_mapped_column_name(column1, table2) str[source]
view_column_joined(source, table) str[source]
static list_identifiers(table)[source]
matches(create_statement, list_of_tables) bool[source]
create(connection, list_of_tables=None)[source]
add_fk_validation(table, pk, action, target, columns, pt, fk_columns)[source]
classmethod parse_wildcard_column_spec(s: str) Optional[Tuple[str, str, List, str]][source]
classmethod is_column_wildcard(name: str)[source]
classmethod get_columns(definition: Dict)[source]
classmethod get_columns_as_dict(definition: Dict) Dict[source]