libdballe 9.6
|
Precompiled queries to manipulate the lev_tr table. More...
#include <levtr.h>
Public Member Functions | |
MySQLLevTr (v7::Transaction &tr, dballe::sql::MySQLConnection &conn) | |
MySQLLevTr (const LevTr &)=delete | |
MySQLLevTr (const LevTr &&)=delete | |
MySQLLevTr & | operator= (const MySQLLevTr &)=delete |
void | prefetch_ids (Tracer<> &trc, const std::set< int > &ids) override |
Given a set of IDs, load LevTr information for them and add it to the cache. | |
const LevTrEntry * | lookup_id (Tracer<> &trc, int id) override |
Look up a LevTr from the database given its ID. | |
int | obtain_id (Tracer<> &trc, const LevTrEntry &desc) override |
Look up a LevTr from the database given its description. | |
![]() | |
LevTr (v7::Transaction &tr) | |
void | clear_cache () |
Invalidate the LevTrEntry cache. | |
virtual void | prefetch_ids (Tracer<> &trc, const std::set< int > &ids)=0 |
Given a set of IDs, load LevTr information for them and add it to the cache. | |
impl::msg::Context * | to_msg (Tracer<> &trc, int id, impl::Message &msg) |
Get/create a Context in the Msg for this level/timerange. | |
const LevTrEntry & | lookup_cache (int id) |
Lookup a LevTr entry from the cache, throwing an exception if it is not found. | |
virtual const LevTrEntry * | lookup_id (Tracer<> &trc, int id)=0 |
Look up a LevTr from the database given its ID. | |
virtual int | obtain_id (Tracer<> &trc, const LevTrEntry &desc)=0 |
Look up a LevTr from the database given its description. | |
void | dump (FILE *out) |
Dump the entire contents of the table to an output stream. | |
Protected Member Functions | |
void | _dump (std::function< void(int, const Level &, const Trange &)> out) override |
virtual void | _dump (std::function< void(int, const Level &, const Trange &)> out)=0 |
Protected Attributes | |
dballe::sql::MySQLConnection & | conn |
DB connection. | |
![]() | |
v7::Transaction & | tr |
LevTrCache | cache |
Precompiled queries to manipulate the lev_tr table.
|
overrideprotectedvirtual |
Implements dballe::db::v7::LevTr.
|
overridevirtual |
Look up a LevTr from the database given its ID.
Implements dballe::db::v7::LevTr.
|
overridevirtual |
Look up a LevTr from the database given its description.
Insert a new one if not found.
Implements dballe::db::v7::LevTr.
|
overridevirtual |
Given a set of IDs, load LevTr information for them and add it to the cache.
Implements dballe::db::v7::LevTr.