1 #ifndef DBALLE_DB_V7_SQLITE_DATA_H 2 #define DBALLE_DB_V7_SQLITE_DATA_H 4 #include <dballe/db/v7/data.h> 15 template<
typename Traits>
42 void read_attrs(
int id_data, std::function<
void(std::unique_ptr<wreport::Var>)> dest)
override;
57 using SQLiteDataCommon::SQLiteDataCommon;
61 void dump(FILE* out)
override;
70 using SQLiteDataCommon::SQLiteDataCommon;
74 void dump(FILE* out)
override;
Precompiled query to manipulate the data table.
Definition: sqlite/data.h:67
void write_attrs(int id_data, const Values &values) override
Replace the attributes of a variable with those in Values.
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.
virtual void dump(FILE *out)=0
Dump the entire contents of the table to an output stream.
dballe::sql::SQLiteStatement * write_attrs_stm
Precompiled write attributes statement.
Definition: sqlite/data.h:25
Definition: v7/qbuilder.h:115
dballe::sql::SQLiteStatement * sstm
Precompiled select statement.
Definition: sqlite/data.h:29
Definition: sqlite/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
dballe::sql::SQLiteConnection & conn
DB connection.
Definition: sqlite/data.h:20
Input for a bulk insert of a lot of variables sharing the same context information.
Definition: data.h:275
dballe::sql::SQLiteStatement * istm
Precompiled insert statement.
Definition: sqlite/data.h:31
dballe::sql::SQLiteStatement * remove_attrs_stm
Precompiled remove attributes statement.
Definition: sqlite/data.h:27
Definition: db/v7/transaction.h:12
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::SQLiteStatement * ustm
Precompiled update statement.
Definition: sqlite/data.h:33
void remove_all_attrs(int id_data) override
Remove all attributes from a variable.
SQLite statement.
Definition: sqlite.h:88
dballe::sql::SQLiteStatement * read_attrs_stm
Precompiled read attributes statement.
Definition: sqlite/data.h:23
Precompiled query to manipulate the station data table.
Definition: sqlite/data.h:54
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: sqlite.h:33