1 #ifndef DBALLE_DB_V7_POSTGRESQL_DATA_H 2 #define DBALLE_DB_V7_POSTGRESQL_DATA_H 4 #include <dballe/db/v7/data.h> 5 #include <dballe/db/v7/cache.h> 11 namespace postgresql {
14 template<
typename Parent>
20 std::string select_attrs_query_name;
21 std::string write_attrs_query_name;
22 std::string remove_attrs_query_name;
23 std::string remove_data_query_name;
31 void update(
Tracer<>& trc, std::vector<typename Parent::BatchValue>& vars,
bool with_attrs)
override;
32 void read_attrs(
Tracer<>& trc,
int id_data, std::function<
void(std::unique_ptr<wreport::Var>)> dest)
override;
33 void write_attrs(
Tracer<>& trc,
int id_data,
const Values& values)
override;
34 void remove_all_attrs(
Tracer<>& trc,
int id_data)
override;
36 void remove_by_id(
Tracer<>& trc,
int id)
override;
46 using PostgreSQLDataCommon::PostgreSQLDataCommon;
51 void insert(
Tracer<>& trc,
int id_station, std::vector<batch::StationDatum>& vars,
bool with_attrs)
override;
53 void dump(FILE* out)
override;
54 void clear_cache()
override {}
60 using PostgreSQLDataCommon::PostgreSQLDataCommon;
65 void insert(
Tracer<>& trc,
int id_station,
const Datetime& datetime, std::vector<batch::MeasuredDatum>& vars,
bool with_attrs)
override;
68 void dump(FILE* out)
override;
69 void clear_cache()
override {}
Forward declarations for public dballe/sql names.
Database connection.
Definition: postgresql.h:241
Definition: qbuilder.h:124
Definition: qbuilder.h:115
Definition: db/v7/postgresql/data.h:15
Definition: db/v7/postgresql/data.h:57
Definition: db/v7/postgresql/data.h:43
Range of datetimes.
Definition: types.h:294
Definition: transaction.h:15
dballe::sql::PostgreSQLConnection & conn
DB connection.
Definition: db/v7/postgresql/data.h:19
Smart pointer for trace::Step objects, which calls done() when going out of scope.
Definition: db/v7/fwd.h:45
Date and time.
Definition: types.h:164
Collection of Value objects, indexed by wreport::Varcode.
Definition: values.h:176
Definition: qbuilder.h:91