libdballe  7.21
mysql/attrv6.h
1 #ifndef DBALLE_DB_V6_MYSQL_ATTRV6_H
2 #define DBALLE_DB_V6_MYSQL_ATTRV6_H
3 
4 #include <dballe/db/v6/attrv6.h>
5 #include <dballe/sql/fwd.h>
6 
7 namespace dballe {
8 namespace db {
9 namespace v6 {
10 namespace mysql {
11 
15 class MySQLAttrV6 : public v6::AttrV6
16 {
17 protected:
20 
21 public:
23  MySQLAttrV6(const MySQLAttrV6&) = delete;
24  MySQLAttrV6(const MySQLAttrV6&&) = delete;
25  MySQLAttrV6& operator=(const MySQLAttrV6&) = delete;
26  ~MySQLAttrV6();
27 
28  void insert(dballe::sql::Transaction& t, v6::bulk::InsertAttrsV6& vars, UpdateMode update_mode=UPDATE) override;
29  void read(int id_data, std::function<void(std::unique_ptr<wreport::Var>)> dest) override;
30  void dump(FILE* out) override;
31 };
32 
33 }
34 }
35 }
36 }
37 #endif
void dump(FILE *out) override
Dump the entire contents of the table to an output stream.
Forward declarations for public dballe/sql names.
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
Precompiled queries to manipulate the attr table.
Definition: mysql/attrv6.h:15
A RAII transaction interface.
Definition: sql.h:133
void insert(dballe::sql::Transaction &t, v6::bulk::InsertAttrsV6 &vars, UpdateMode update_mode=UPDATE) override
Bulk attribute insert.
void read(int id_data, std::function< void(std::unique_ptr< wreport::Var >)> dest) override
Load from the database all the attributes for var.
dballe::sql::MySQLConnection & conn
DB connection.
Definition: mysql/attrv6.h:19
Precompiled queries to manipulate the attr table.
Definition: attrv6.h:26
Database connection.
Definition: mysql.h:125