1 #ifndef DBALLE_DB_V7_MYSQL_DATA_H 2 #define DBALLE_DB_V7_MYSQL_DATA_H 4 #include <dballe/db/v7/data.h> 15 template<
typename Traits>
23 dballe::sql::MySQLStatement* read_attrs_stm =
nullptr;
26 dballe::sql::MySQLStatement* write_attrs_stm =
nullptr;
28 dballe::sql::MySQLStatement* remove_attrs_stm =
nullptr;
30 dballe::sql::MySQLStatement* sstm =
nullptr;
32 dballe::sql::MySQLStatement* istm =
nullptr;
34 dballe::sql::MySQLStatement* ustm =
nullptr;
44 void read_attrs(
int id_data, std::function<
void(std::unique_ptr<wreport::Var>)> dest)
override;
59 using MySQLDataCommon::MySQLDataCommon;
63 void dump(FILE* out)
override;
72 using MySQLDataCommon::MySQLDataCommon;
76 void dump(FILE* out)
override;
virtual void dump(FILE *out)=0
Dump the entire contents of the table to an output stream.
Definition: v7/qbuilder.h:115
Definition: mysql/data.h:16
Forward declarations for public dballe/sql names.
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
void write_attrs(int id_data, const Values &values) override
Replace the attributes of a variable with those in Values.
Precompiled query to manipulate the station data table.
Definition: mysql/data.h:56
Input for a bulk insert of a lot of variables sharing the same context information.
Definition: data.h:275
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.
Definition: db/v7/transaction.h:12
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.
dballe::sql::MySQLConnection & conn
DB connection.
Definition: mysql/data.h:20
Input for a bulk insert of a lot of variables sharing the same context information.
Definition: data.h:297
Collection of Value objects, indexed by wreport::Varcode.
Definition: values.h:202
Database connection.
Definition: mysql.h:125
Precompiled query to manipulate the data table.
Definition: mysql/data.h:69