emzed.table.base_models module

class emzed.table.base_models.BaseModel(parent_model, conn, access_name, col_names, col_types, col_formats, title, col_name_mapping, version=None)[source]

Bases: DbBackedModel

add_column(name, what, type_, format_, insert_after, insert_before)[source]
add_column_with_constant_value(name, value, type_, format_, insert_after, insert_before)[source]
add_row(row)[source]
append(rows)[source]
close()[source]
column_accessor(col_name)[source]
consolidate(path, overwrite)[source]

we pass meta_data from the Table class, model implementations do not manage meta data

count()[source]
count_distinct(col_name)[source]
create_index(name)[source]
delete_rows(rows)[source]
drop_columns(col_names)[source]
drop_index(name)[source]
extract_columns(names)[source]

TODO: we might review the creation of views for joins and also for extracting columns etc.

find_matching_rows(col_name, value)[source]
get_iter()[source]
get_iter_raw(col_names=None)[source]
get_row(index)[source]
property indices
indices_for_rows_matching(expression)[source]
property info
property inv_indices
load_from(rows)[source]
property max_index
static read_info(conn, access_name, key)[source]
register_view(view)[source]
rename_columns(from_to)[source]
replace_column(name, what, type_, format_)[source]
replace_column_with_constant_value(name, value, type_, format_, insert_after, insert_before)[source]
save_csv(path, as_printed, delimiter, dash_is_none)[source]
save_info()[source]
set_col_format(col_name, format_)[source]
set_col_type(col_name, type_, *, keep_format=False)[source]
set_title(title)[source]
set_values(row_indices, col_index, values)[source]
sorting_permutation(col_names_and_orders)[source]
split_by(col_names)[source]
split_by_iter(col_names)[source]
property unique_id
update_col_formatters()[source]
class emzed.table.base_models.ViewModel(parent_model, access_name)[source]

Bases: BaseModel

invalidate()[source]
emzed.table.base_models.check_if_model_is_valid(method)[source]