1 #ifndef DBALLE_DB_V7_MYSQL_DATA_H 2 #define DBALLE_DB_V7_MYSQL_DATA_H 4 #include <dballe/db/v7/data.h> 5 #include <dballe/db/v7/cache.h> 14 template<
typename Parent>
22 dballe::sql::MySQLStatement* read_attrs_stm =
nullptr;
25 dballe::sql::MySQLStatement* write_attrs_stm =
nullptr;
27 dballe::sql::MySQLStatement* remove_attrs_stm =
nullptr;
29 dballe::sql::MySQLStatement* sstm =
nullptr;
31 dballe::sql::MySQLStatement* istm =
nullptr;
33 dballe::sql::MySQLStatement* ustm =
nullptr;
43 void update(
Tracer<>& trc, std::vector<typename Parent::BatchValue>& vars,
bool with_attrs)
override;
44 void read_attrs(
Tracer<>& trc,
int id_data, std::function<
void(std::unique_ptr<wreport::Var>)> dest)
override;
45 void write_attrs(
Tracer<>& trc,
int id_data,
const Values& values)
override;
46 void remove_all_attrs(
Tracer<>& trc,
int id_data)
override;
48 void remove_by_id(
Tracer<>& trc,
int id)
override;
60 using MySQLDataCommon::MySQLDataCommon;
65 void insert(
Tracer<>& trc,
int id_station, std::vector<batch::StationDatum>& vars,
bool with_attrs)
override;
67 void dump(FILE* out)
override;
68 void clear_cache()
override {}
77 using MySQLDataCommon::MySQLDataCommon;
82 void insert(
Tracer<>& trc,
int id_station,
const Datetime& datetime, std::vector<batch::MeasuredDatum>& vars,
bool with_attrs)
override;
85 void dump(FILE* out)
override;
86 void clear_cache()
override {}
Forward declarations for public dballe/sql names.
Definition: qbuilder.h:124
Definition: qbuilder.h:115
Definition: db/v7/mysql/data.h:15
dballe::sql::MySQLConnection & conn
DB connection.
Definition: db/v7/mysql/data.h:19
Precompiled query to manipulate the station data table.
Definition: db/v7/mysql/data.h:57
Range of datetimes.
Definition: types.h:294
Definition: transaction.h:15
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
Database connection.
Definition: mysql.h:126
Precompiled query to manipulate the data table.
Definition: db/v7/mysql/data.h:74
Definition: qbuilder.h:91