disbi.cache_table module¶
Handles the caching of joined tables in the DB.
-
disbi.cache_table.
check_for_table_change
(exp_model, check_for)¶ Wrapper for checking whether data in DB tables has changed.
Parameters: check_for (str) – Either bio
for checking all tables that belong toBiologicalModel
ordata
for checking all tables that belong toMeasurementModel
.
-
disbi.cache_table.
check_table
(dbtables)¶ 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)¶ 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)¶ 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)¶ Reconstruct the prejoined backbone table of the biological models.