libdballe  7.21
v6/postgresql/levtr.h
1 #ifndef DBALLE_DB_V6_POSTGRESQL_LEV_TR_H
2 #define DBALLE_DB_V6_POSTGRESQL_LEV_TR_H
3 
4 #include <dballe/db/db.h>
5 #include <dballe/db/v6/levtr.h>
6 #include <dballe/sql/fwd.h>
7 #include <cstdio>
8 #include <memory>
9 
10 namespace dballe {
11 struct Record;
12 struct Msg;
13 
14 namespace msg {
15 struct Context;
16 }
17 
18 namespace db {
19 namespace v6 {
20 namespace postgresql {
21 struct DB;
22 
27 {
28 protected:
33 
34  DBRow working_row;
35 
36 public:
38  PostgreSQLLevTrV6(const LevTr&) = delete;
39  PostgreSQLLevTrV6(const LevTr&&) = delete;
40  PostgreSQLLevTrV6& operator=(const PostgreSQLLevTrV6&) = delete;
42 
47  int obtain_id(const Level& lev, const Trange& tr) override;
48 
49  const DBRow* read(int id) override;
50  void read_all(std::function<void(const DBRow&)> dest) override;
51 
55  void dump(FILE* out) override;
56 };
57 
58 
59 }
60 }
61 }
62 }
63 #endif
Database connection.
Definition: postgresql.h:239
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:587
Forward declarations for public dballe/sql names.
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
Vertical level or layer.
Definition: types.h:532
Functions used to connect to DB-All.e and insert, query and delete data.
dballe::sql::PostgreSQLConnection & conn
DB connection.
Definition: v6/postgresql/levtr.h:32
Definition: v6/levtr.h:24
Precompiled queries to manipulate the lev_tr table.
Definition: v6/postgresql/levtr.h:26
Precompiled queries to manipulate the lev_tr table.
Definition: v6/levtr.h:22