libdballe  7.21
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dballe::db::v7::postgresql::PostgreSQLLevTr Struct Reference

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

#include <levtr.h>

Inheritance diagram for dballe::db::v7::postgresql::PostgreSQLLevTr:
dballe::db::v7::LevTr

Public Member Functions

 PostgreSQLLevTr (dballe::sql::PostgreSQLConnection &conn)
 
 PostgreSQLLevTr (const LevTr &)=delete
 
 PostgreSQLLevTr (const LevTr &&)=delete
 
PostgreSQLLevTroperator= (const PostgreSQLLevTr &)=delete
 
void prefetch_ids (const std::set< int > &ids, std::function< void(int, const LevTrDesc &)> dest) override
 Given a set of IDs, load LevTr information for them and add it to data.
 
void prefetch_same_level (int id, std::function< void(int, const LevTrDesc &)> dest) override
 Given an ID, load LevTr information for all the entries with the same level type.
 
levtrs_t::iterator lookup_id (State &st, int id) override
 Look up a LevTr from the database given its ID.
 
levtrs_t::iterator obtain_id (State &state, const LevTrDesc &desc) override
 Look up a LevTr from the database given its description. More...
 
- Public Member Functions inherited from dballe::db::v7::LevTr
msg::Contextto_msg (State &st, int id, Msg &msg)
 Get/create a Context in the Msg for this level/timerange. More...
 
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::PostgreSQLConnectionconn
 

Detailed Description

Precompiled queries to manipulate the lev_tr table.

Member Function Documentation

§ obtain_id()

levtrs_t::iterator dballe::db::v7::postgresql::PostgreSQLLevTr::obtain_id ( State state,
const LevTrDesc 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: