biggr_models.queries.summary_queries#
Read precomputed whole-database counts for the front page and statistics.
The counts are written by the cobradb ETL (cobradb.summary_loading), which runs as the final step of bin/load_db. Every run appends a snapshot, so the table is both the current totals and the history of how the database has grown. Reading it costs one indexed query instead of a COUNT(*) per card on every request.
Attributes#
Functions#
|
Return {entity_type: count} for the front page cards. |
|
Return {entity_type: [{"date": ..., "count": ...}, ...]} oldest first. |
Module Contents#
- biggr_models.queries.summary_queries.SUMMARY_ENTITY_TYPES = ('collections', 'models', 'metabolites', 'reactions', 'genomes', 'compartments')#