1 #ifndef DBALLE_DB_V7_MYSQL_DATA_H 2 #define DBALLE_DB_V7_MYSQL_DATA_H 4 #include <dballe/db/v7/cache.h> 5 #include <dballe/db/v7/data.h> 21 dballe::sql::MySQLStatement* read_attrs_stm =
nullptr;
24 dballe::sql::MySQLStatement* write_attrs_stm =
nullptr;
26 dballe::sql::MySQLStatement* remove_attrs_stm =
nullptr;
28 dballe::sql::MySQLStatement* sstm =
nullptr;
30 dballe::sql::MySQLStatement* istm =
nullptr;
32 dballe::sql::MySQLStatement* ustm =
nullptr;
42 void update(
Tracer<>& trc, std::vector<typename Parent::BatchValue>& vars,
43 bool with_attrs)
override;
46 std::function<
void(std::unique_ptr<wreport::Var>)> dest)
override;
47 void write_attrs(
Tracer<>& trc,
int id_data,
const Values& values)
override;
48 void remove_all_attrs(
Tracer<>& trc,
int id_data)
override;
50 void remove_by_id(
Tracer<>& trc,
int id)
override;
62 using MySQLDataCommon::MySQLDataCommon;
68 std::function<
void(
int id, wreport::Varcode code)> dest)
override;
69 void insert(
Tracer<>& trc,
int id_station,
70 std::vector<batch::StationDatum>& vars,
71 bool with_attrs)
override;
72 void run_station_data_query(
75 std::unique_ptr<wreport::Var> var)>)
override;
76 void dump(FILE* out)
override;
77 void clear_cache()
override {}
86 using MySQLDataCommon::MySQLDataCommon;
91 std::function<
void(
int id,
int id_levtr, wreport::Varcode code)>
94 std::vector<batch::MeasuredDatum>& vars,
95 bool with_attrs)
override;
99 const Datetime& datetime,
int id_data,
100 std::unique_ptr<wreport::Var> var)>)
override;
101 void run_summary_query(
105 size_t size)>)
override;
106 void dump(FILE* out)
override;
107 void clear_cache()
override {}
Forward declarations for public dballe/sql names.
Definition: qbuilder.h:134
Definition: qbuilder.h:121
Definition: db/v7/mysql/data.h:14
dballe::sql::MySQLConnection & conn
DB connection.
Definition: db/v7/mysql/data.h:18
Precompiled query to manipulate the station data table.
Definition: db/v7/mysql/data.h:59
Range of datetimes.
Definition: types.h:296
Definition: transaction.h:15
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
Database connection.
Definition: mysql.h:140
Precompiled query to manipulate the data table.
Definition: db/v7/mysql/data.h:83
Definition: qbuilder.h:95