1#ifndef DBALLE_DB_V7_BATCH_H
2#define DBALLE_DB_V7_BATCH_H
4#include <wreport/var.h>
6#include <dballe/core/smallset.h>
7#include <dballe/db/v7/fwd.h>
8#include <dballe/db/v7/utils.h>
21 bool write_attrs =
true;
24 bool have_station(
const std::string& report,
const Coords& coords,
const Ident& ident);
25 void new_station(
Tracer<>& trc,
const std::string& report,
const Coords& coords,
const Ident& ident);
29 unsigned count_select_stations = 0;
30 unsigned count_select_station_data = 0;
31 unsigned count_select_data = 0;
36 void set_write_attrs(
bool write_attrs);
43 void dump(
FILE* out)
const;
65 void dump(
FILE* out)
const;
79 std::vector<StationDatum> to_insert;
80 std::vector<StationDatum> to_update;
94 : id_levtr(id_levtr), var(var) {}
96 : id(
id), id_levtr(id_levtr), var(var) {}
98 void dump(
FILE* out)
const;
100 bool operator==(
const MeasuredDatum&
o)
const {
return id_levtr ==
o.id_levtr && var->
code() ==
o.var->code(); }
109 : id_varcode(id_varcode), id(
id)
124 std::vector<MeasuredDatum> to_insert;
125 std::vector<MeasuredDatum> to_update;
162 void dump(
FILE* out)
const;
A station identifier, that can be any string (including the empty string) or a missing value.
Definition types.h:748
Smart pointer for trace::Step objects, which calls done() when going out of scope.
Definition db/v7/fwd.h:46
Coordinates.
Definition types.h:369
Date and time.
Definition types.h:165
Set structure optimized for a small number of items.
Definition smallset.h:17
Definition transaction.h:16
Common base types used by most of DB-All.e code.