libdballe
7.29
|
Public Member Functions | |
Explorer (dballe::DB &db) | |
const dballe::Query & | get_filter () const |
Get the current filter. | |
void | set_filter (const dballe::Query &query) |
Set a new filter, updating all browsing data. | |
void | revalidate () |
Throw away all cached data and reload everything from the database. More... | |
const dballe::db::Summary & | global_summary () const |
Get a reference to the global summary. | |
const dballe::db::Summary & | active_summary () const |
Get a reference to the summary for the current filter. | |
void | update_station (values::Value &val, const wreport::Var &new_val) |
Update val in the database to have the value new_val. More... | |
void | update_data (values::Value &val, const wreport::Var &new_val) |
Update val in the database to have the value new_val. More... | |
void | update_attr (int var_id, wreport::Varcode var_related, const wreport::Var &new_val) |
Update an attribute. | |
void | remove (const values::Value &val) |
Remove the value from the database. | |
Protected Attributes | |
dballe::DB & | db |
DB-All.e database. | |
dballe::core::Query | filter |
Currently active filter. | |
dballe::db::Summary * | _global_summary = nullptr |
Summary of the whole database. | |
dballe::db::Summary * | _active_summary = nullptr |
Summary of active_filter. | |
void dballe::db::Explorer::revalidate | ( | ) |
Throw away all cached data and reload everything from the database.
Use this when you suspect that the database has been externally modified
void dballe::db::Explorer::update_data | ( | values::Value & | val, |
const wreport::Var & | new_val | ||
) |
Update val in the database to have the value new_val.
Updates the 'val' member of 'val' if it succeeded, otherwise exceptions are raised
void dballe::db::Explorer::update_station | ( | values::Value & | val, |
const wreport::Var & | new_val | ||
) |
Update val in the database to have the value new_val.
Updates the 'val' member of 'val' if it succeeded, otherwise exceptions are raised