disbi.cache_table module

Handles the caching of joined tables in the DB.

disbi.cache_table.check_for_table_change(exp_model, check_for)[source]

Wrapper for checking whether data in DB tables has changed.

Parameters:check_for (str) – Either bio for checking all tables that belong to BiologicalModel or data for checking all tables that belong to MeasurementModel.
disbi.cache_table.check_table(dbtables)[source]

Check whether DB tables changed since the last time.

Parameters:dbtables (iterable of str) – The tables that should be checked.
Returns:bool – True if at least one table changed, else False.
disbi.cache_table.drop_datatables(app_label)[source]

Drop all cached datatables.

Parameters:app_label (str) – The name of the app the tables belong to.
disbi.cache_table.get_table_names_by_pattern(pattern)[source]

Get all tables from DB that match a pattern.

Parameters:pattern (str) – An SQL string or pattern with placeholders.
Returns:tuple – The matched table names.
disbi.cache_table.reconstruct_backbone_table(app_label)[source]

Reconstruct the prejoined backbone table of the biological models.