1#ifndef DBALLE_DB_V7_POSTGRESQL_DATA_H
2#define DBALLE_DB_V7_POSTGRESQL_DATA_H
4#include <dballe/db/v7/data.h>
5#include <dballe/db/v7/cache.h>
14template<
typename Parent>
20 std::string select_attrs_query_name;
21 std::string write_attrs_query_name;
22 std::string remove_attrs_query_name;
23 std::string remove_data_query_name;
32 void read_attrs(
Tracer<>& trc,
int id_data, std::function<
void(std::unique_ptr<wreport::Var>)>
dest)
override;
36 void remove_by_id(
Tracer<>& trc,
int id)
override;
46 using PostgreSQLDataCommon::PostgreSQLDataCommon;
54 void clear_cache()
override {}
60 using PostgreSQLDataCommon::PostgreSQLDataCommon;
69 void clear_cache()
override {}
Smart pointer for trace::Step objects, which calls done() when going out of scope.
Definition db/v7/fwd.h:46
Definition db/v7/postgresql/data.h:16
dballe::sql::PostgreSQLConnection & conn
DB connection.
Definition db/v7/postgresql/data.h:19
Definition db/v7/postgresql/data.h:58
void run_summary_query(Tracer<> &trc, const v7::SummaryQueryBuilder &qb, std::function< void(const dballe::DBStation &station, int id_levtr, wreport::Varcode code, const DatetimeRange &datetime, size_t size)>) override
Run a summary query, iterating on the resulting variables.
void insert(Tracer<> &trc, int id_station, const Datetime &datetime, std::vector< batch::MeasuredDatum > &vars, bool with_attrs) override
Bulk variable insert.
void dump(FILE *out) override
Dump the entire contents of the table to an output stream.
void query(Tracer<> &trc, int id_station, const Datetime &datetime, std::function< void(int id, int id_levtr, wreport::Varcode code)> dest) override
Query contents of the data table.
void run_data_query(Tracer<> &trc, const v7::DataQueryBuilder &qb, std::function< void(const dballe::DBStation &station, int id_levtr, const Datetime &datetime, int id_data, std::unique_ptr< wreport::Var > var)>) override
Run a data query, iterating on the resulting variables.
Definition db/v7/postgresql/data.h:44
void dump(FILE *out) override
Dump the entire contents of the table to an output stream.
void insert(Tracer<> &trc, int id_station, std::vector< batch::StationDatum > &vars, bool with_attrs) override
Bulk variable insert.
void query(Tracer<> &trc, int id_station, std::function< void(int id, wreport::Varcode code)> dest) override
Query contents of the data table.
void run_station_data_query(Tracer<> &trc, const v7::DataQueryBuilder &qb, std::function< void(const dballe::DBStation &station, int id_data, std::unique_ptr< wreport::Var > var)>) override
Run a station data query, iterating on the resulting variables.
Database connection.
Definition postgresql.h:242
Forward declarations for public dballe/sql names.
Range of datetimes.
Definition types.h:295
Date and time.
Definition types.h:165
Collection of Value objects, indexed by wreport::Varcode.
Definition values.h:177
Definition qbuilder.h:116
Definition qbuilder.h:125
Definition transaction.h:16