libdballe  9.11
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dballe::db::v7::mysql::MySQLLevTr Struct Reference

Precompiled queries to manipulate the lev_tr table. More...

#include <levtr.h>

Inheritance diagram for dballe::db::v7::mysql::MySQLLevTr:
dballe::db::v7::LevTr

Public Member Functions

 MySQLLevTr (v7::Transaction &tr, dballe::sql::MySQLConnection &conn)
 
 MySQLLevTr (const LevTr &)=delete
 
 MySQLLevTr (const LevTr &&)=delete
 
MySQLLevTroperator= (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 LevTrEntrylookup_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. More...
 
- Public Member Functions inherited from dballe::db::v7::LevTr
 LevTr (v7::Transaction &tr)
 
void clear_cache ()
 Invalidate the LevTrEntry cache. More...
 
impl::msg::Contextto_msg (Tracer<> &trc, int id, impl::Message &msg)
 Get/create a Context in the Msg for this level/timerange. More...
 
const LevTrEntrylookup_cache (int id)
 Lookup a LevTr entry from the cache, throwing an exception if it is not found.
 
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
 

Protected Attributes

dballe::sql::MySQLConnectionconn
 DB connection.
 
- Protected Attributes inherited from dballe::db::v7::LevTr
v7::Transactiontr
 
LevTrCache cache
 

Detailed Description

Precompiled queries to manipulate the lev_tr table.

Member Function Documentation

◆ obtain_id()

int dballe::db::v7::mysql::MySQLLevTr::obtain_id ( Tracer<> &  trc,
const LevTrEntry desc 
)
overridevirtual

Look up a LevTr from the database given its description.

Insert a new one if not found.

Implements dballe::db::v7::LevTr.


The documentation for this struct was generated from the following file: