libdballe  7.21
postgresql/attrv6.h
1 #ifndef DBALLE_DB_V6_POSTGRESQL_ATTRV6_H
2 #define DBALLE_DB_V6_POSTGRESQL_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 postgresql {
11 
16 {
17 protected:
20 
21 public:
23  PostgreSQLAttrV6(const PostgreSQLAttrV6&) = delete;
24  PostgreSQLAttrV6(const PostgreSQLAttrV6&&) = delete;
25  PostgreSQLAttrV6& operator=(const PostgreSQLAttrV6&) = delete;
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
Database connection.
Definition: postgresql.h:239
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::PostgreSQLConnection & conn
DB connection.
Definition: postgresql/attrv6.h:19
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
A RAII transaction interface.
Definition: sql.h:133
Precompiled queries to manipulate the attr table.
Definition: attrv6.h:26
void insert(dballe::sql::Transaction &t, v6::bulk::InsertAttrsV6 &vars, UpdateMode update_mode=UPDATE) override
Bulk attribute insert.
Precompiled queries to manipulate the attr table.
Definition: postgresql/attrv6.h:15