1 #ifndef DBALLE_DB_SUMMARY_H
2 #define DBALLE_DB_SUMMARY_H
4 #include <dballe/core/query.h>
37 int count = MISSING_INT;
54 std::vector<summary::Entry> entries;
64 std::map<int, Station> all_stations;
65 std::set<std::string> all_reports;
66 std::set<dballe::Level> all_levels;
67 std::set<dballe::Trange> all_tranges;
68 std::set<wreport::Varcode> all_varcodes;
73 unsigned count = MISSING_INT;
78 const Datetime& datetime_min()
const {
return dtrange.
min; }
79 const Datetime& datetime_max()
const {
return dtrange.
max; }
80 unsigned data_count()
const {
return count; }
86 summary::Support
supports(
const Query& query)
const;
97 void add_entry(
const summary::Entry& entry);
100 bool iterate(std::function<
bool(
const summary::Entry&)> f)
const;
Cursor iterating over summary entries.
Definition: db.h:146
Information about a station.
Definition: values.h:21
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:587
bool is_valid() const
Return true if the summary has been filled with data.
Definition: summary.h:76
Standard dballe::Query implementation.
Definition: core/query.h:29
Vertical level or layer.
Definition: types.h:532
Functions used to connect to DB-All.e and insert, query and delete data.
void add_entry(const summary::Entry &entry)
Add a copy of an existing entry.
Range of datetimes.
Definition: types.h:272
Datetime max
Upper bound of the range.
Definition: types.h:277
bool iterate(std::function< bool(const summary::Entry &)> f) const
Iterate all values in the summary.
Datetime min
Lower bound of the range.
Definition: types.h:275
High level objects for working with DB-All.e DB summaries.
Definition: summary.h:47
summary::Support supports(const Query &query) const
Checks if this summary correctly generate a summary for the given query.
Query used to filter DB-All.e data.
Definition: query.h:14
Date and time.
Definition: types.h:158
void add_summary(db::CursorSummary &cur)
Add an entry to the summary taken from the current status of cur.
Structures used as input to database insert functions.
void add_filtered(const Summary &summary)
Add entries from a summary, filtered with a query.