1 #ifndef DBALLE_DB_V7_POSTGRESQL_DATA_H 2 #define DBALLE_DB_V7_POSTGRESQL_DATA_H 4 #include <dballe/db/v7/data.h> 12 namespace postgresql {
15 template<
typename Traits>
21 std::string select_attrs_query_name;
22 std::string write_attrs_query_name;
23 std::string remove_attrs_query_name;
24 std::string remove_data_query_name;
32 void read_attrs(
int id_data, std::function<
void(std::unique_ptr<wreport::Var>)> dest)
override;
45 using PostgreSQLDataCommon::PostgreSQLDataCommon;
50 void dump(FILE* out)
override;
56 using PostgreSQLDataCommon::PostgreSQLDataCommon;
61 void dump(FILE* out)
override;
Database connection.
Definition: postgresql.h:239
virtual void dump(FILE *out)=0
Dump the entire contents of the table to an output stream.
Definition: v7/qbuilder.h:115
Definition: postgresql/data.h:16
Definition: postgresql/data.h:53
Forward declarations for public dballe/sql names.
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
Definition: postgresql/data.h:42
Input for a bulk insert of a lot of variables sharing the same context information.
Definition: data.h:275
dballe::sql::PostgreSQLConnection & conn
DB connection.
Definition: postgresql/data.h:20
Definition: db/v7/transaction.h:12
void read_attrs(int id_data, std::function< void(std::unique_ptr< wreport::Var >)> dest) override
Load from the database all the attributes for var.
void remove_all_attrs(int id_data) override
Remove all attributes from a variable.
virtual void insert(dballe::db::v7::Transaction &t, typename Traits::BulkVars &vars, bulk::UpdateMode update_mode=bulk::UPDATE, bool with_attrs=false)=0
Bulk variable insert.
Input for a bulk insert of a lot of variables sharing the same context information.
Definition: data.h:297
void write_attrs(int id_data, const Values &values) override
Replace the attributes of a variable with those in Values.
Collection of Value objects, indexed by wreport::Varcode.
Definition: values.h:202