libdballe  7.19
v6/mysql/levtr.h
1 #ifndef DBALLE_DB_V6_MYSQL_LEVTRV6_H
2 #define DBALLE_DB_V6_MYSQL_LEVTRV6_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 mysql {
21 struct DB;
22 
26 struct MySQLLevTrV6 : public v6::LevTr
27 {
28 protected:
31 
32  DBRow working_row;
33 
34 public:
36  MySQLLevTrV6(const LevTr&) = delete;
37  MySQLLevTrV6(const LevTr&&) = delete;
38  MySQLLevTrV6& operator=(const MySQLLevTrV6&) = delete;
39  ~MySQLLevTrV6();
40 
45  int obtain_id(const Level& lev, const Trange& tr) override;
46 
47  const DBRow* read(int id) override;
48  void read_all(std::function<void(const DBRow&)> dest) override;
49 
53  void dump(FILE* out) override;
54 };
55 
56 }
57 }
58 }
59 }
60 #endif
61 
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
dballe::sql::MySQLConnection & conn
DB connection.
Definition: v6/mysql/levtr.h:30
Vertical level or layer.
Definition: types.h:532
Functions used to connect to DB-All.e and insert, query and delete data.
Precompiled queries to manipulate the lev_tr table.
Definition: v6/mysql/levtr.h:26
Precompiled queries to manipulate the lev_tr table.
Definition: v6/levtr.h:22
Database connection.
Definition: mysql.h:125