libdballe 9.6
postgresql/levtr.h
1#ifndef DBALLE_DB_V7_POSTGRESQL_LEVTRV7_H
2#define DBALLE_DB_V7_POSTGRESQL_LEVTRV7_H
3
4#include <dballe/db/db.h>
5#include <dballe/db/v7/levtr.h>
6#include <dballe/db/v7/fwd.h>
7#include <dballe/sql/fwd.h>
8#include <cstdio>
9#include <memory>
10
11namespace dballe {
12namespace db {
13namespace v7 {
14namespace postgresql {
15struct DB;
16
21{
22protected:
24
25 void _dump(std::function<void(int, const Level&, const Trange&)> out) override;
26
27public:
29 PostgreSQLLevTr(const LevTr&) = delete;
30 PostgreSQLLevTr(const LevTr&&) = delete;
31 PostgreSQLLevTr& operator=(const PostgreSQLLevTr&) = delete;
33
34 void prefetch_ids(Tracer<>& trc, const std::set<int>& ids) override;
35 const LevTrEntry* lookup_id(Tracer<>& trc, int id) override;
36 int obtain_id(Tracer<>& trc, const LevTrEntry& desc) override;
37};
38
39
40}
41}
42}
43}
44#endif
Smart pointer for trace::Step objects, which calls done() when going out of scope.
Definition: db/v7/fwd.h:46
Database connection.
Definition: postgresql.h:242
Functions used to connect to DB-All.e and insert, query and delete data.
Forward declarations for public dballe/sql names.
Vertical level or layer.
Definition: types.h:625
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:687
Definition: cache.h:15
Precompiled queries to manipulate the lev_tr table.
Definition: levtr.h:21
Definition: transaction.h:16
Precompiled queries to manipulate the lev_tr table.
Definition: postgresql/levtr.h:21
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.
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.