1 #ifndef DBALLE_DB_V7_POSTGRESQL_DATA_H 2 #define DBALLE_DB_V7_POSTGRESQL_DATA_H 4 #include <dballe/db/v7/cache.h> 5 #include <dballe/db/v7/data.h> 11 namespace postgresql {
19 std::string select_attrs_query_name;
20 std::string write_attrs_query_name;
21 std::string remove_attrs_query_name;
22 std::string remove_data_query_name;
31 void update(
Tracer<>& trc, std::vector<typename Parent::BatchValue>& vars,
32 bool with_attrs)
override;
35 std::function<
void(std::unique_ptr<wreport::Var>)> dest)
override;
36 void write_attrs(
Tracer<>& trc,
int id_data,
const Values& values)
override;
37 void remove_all_attrs(
Tracer<>& trc,
int id_data)
override;
39 void remove_by_id(
Tracer<>& trc,
int id)
override;
48 using PostgreSQLDataCommon::PostgreSQLDataCommon;
55 std::function<
void(
int id, wreport::Varcode code)> dest)
override;
56 void insert(
Tracer<>& trc,
int id_station,
57 std::vector<batch::StationDatum>& vars,
58 bool with_attrs)
override;
59 void run_station_data_query(
62 std::unique_ptr<wreport::Var> var)>)
override;
63 void dump(FILE* out)
override;
64 void clear_cache()
override {}
70 using PostgreSQLDataCommon::PostgreSQLDataCommon;
76 std::function<
void(
int id,
int id_levtr, wreport::Varcode code)>
79 std::vector<batch::MeasuredDatum>& vars,
80 bool with_attrs)
override;
84 const Datetime& datetime,
int id_data,
85 std::unique_ptr<wreport::Var> var)>)
override;
86 void run_summary_query(
90 size_t size)>)
override;
91 void dump(FILE* out)
override;
92 void clear_cache()
override {}
Forward declarations for public dballe/sql names.
Database connection.
Definition: postgresql.h:239
Definition: qbuilder.h:134
Definition: qbuilder.h:121
Definition: db/v7/postgresql/data.h:14
Definition: db/v7/postgresql/data.h:67
Definition: db/v7/postgresql/data.h:45
Range of datetimes.
Definition: types.h:296
Definition: transaction.h:15
dballe::sql::PostgreSQLConnection & conn
DB connection.
Definition: db/v7/postgresql/data.h:18
Smart pointer for trace::Step objects, which calls done() when going out of scope.
Definition: db/v7/fwd.h:44
Date and time.
Definition: types.h:163
Collection of Value objects, indexed by wreport::Varcode.
Definition: values.h:215
Definition: qbuilder.h:95