libdballe
7.19
|
Precompiled queries to manipulate the lev_tr table. More...
#include <levtr.h>
Public Member Functions | |
virtual void | prefetch_ids (const std::set< int > &ids, std::function< void(int, const LevTrDesc &)> dest)=0 |
Given a set of IDs, load LevTr information for them and add it to data. | |
virtual void | prefetch_same_level (int id, std::function< void(int, const LevTrDesc &)> dest)=0 |
Given an ID, load LevTr information for all the entries with the same level type. | |
msg::Context * | to_msg (State &st, int id, Msg &msg) |
Get/create a Context in the Msg for this level/timerange. More... | |
virtual levtrs_t::iterator | lookup_id (State &st, int id)=0 |
Look up a LevTr from the database given its ID. | |
virtual levtrs_t::iterator | obtain_id (State &state, const LevTrDesc &desc)=0 |
Look up a LevTr from the database given its description. More... | |
void | dump (FILE *out) |
Dump the entire contents of the table to an output stream. | |
Protected Member Functions | |
virtual void | _dump (std::function< void(int, const Level &, const Trange &)> out)=0 |
Precompiled queries to manipulate the lev_tr table.
|
pure virtual |
Look up a LevTr from the database given its description.
Insert a new one if not found.
Implemented in dballe::db::v7::sqlite::SQLiteLevTr, dballe::db::v7::mysql::MySQLLevTr, and dballe::db::v7::postgresql::PostgreSQLLevTr.
msg::Context* dballe::db::v7::LevTr::to_msg | ( | State & | st, |
int | id, | ||
Msg & | msg | ||
) |
Get/create a Context in the Msg for this level/timerange.