libdballe  7.21
sqlite/attrv6.h
1 #ifndef DBALLE_DB_V6_SQLITE_ATTRV6_H
2 #define DBALLE_DB_V6_SQLITE_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 sqlite {
11 
15 class SQLiteAttrV6 : public v6::AttrV6
16 {
17 protected:
20 
27 
28 public:
30  SQLiteAttrV6(const SQLiteAttrV6&) = delete;
31  SQLiteAttrV6(const SQLiteAttrV6&&) = delete;
32  SQLiteAttrV6& operator=(const SQLiteAttrV6&) = delete;
33  ~SQLiteAttrV6();
34 
35  void insert(dballe::sql::Transaction& t, v6::bulk::InsertAttrsV6& vars, UpdateMode update_mode=UPDATE) override;
36  void read(int id_data, std::function<void(std::unique_ptr<wreport::Var>)> dest) override;
37  void dump(FILE* out) override;
38 };
39 
40 }
41 }
42 }
43 }
44 #endif
dballe::sql::SQLiteStatement * sstm
Precompiled select statement.
Definition: sqlite/attrv6.h:22
void read(int id_data, std::function< void(std::unique_ptr< wreport::Var >)> dest) override
Load from the database all the attributes for var.
Forward declarations for public dballe/sql names.
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
dballe::sql::SQLiteConnection & conn
DB connection.
Definition: sqlite/attrv6.h:19
dballe::sql::SQLiteStatement * istm
Precompiled insert statement.
Definition: sqlite/attrv6.h:24
A RAII transaction interface.
Definition: sql.h:133
void dump(FILE *out) override
Dump the entire contents of the table to an output stream.
void insert(dballe::sql::Transaction &t, v6::bulk::InsertAttrsV6 &vars, UpdateMode update_mode=UPDATE) override
Bulk attribute insert.
SQLite statement.
Definition: sqlite.h:88
dballe::sql::SQLiteStatement * ustm
Precompiled update statement.
Definition: sqlite/attrv6.h:26
Precompiled queries to manipulate the attr table.
Definition: attrv6.h:26
Precompiled queries to manipulate the attr table.
Definition: sqlite/attrv6.h:15
Database connection.
Definition: sqlite.h:33