1 #ifndef DBALLE_DB_V7_SQLITE_STATION_H
2 #define DBALLE_DB_V7_SQLITE_STATION_H
4 #include <dballe/db/v7/station.h>
40 void _dump(std::function<
void(
int,
int,
const Coords& coords,
const char* ident)> out)
override;
52 void get_station_vars(
int id_station, std::function<
void(std::unique_ptr<wreport::Var>)> dest)
override;
dballe::sql::SQLiteStatement * sfstm
Precompiled select fixed station query.
Definition: v7/sqlite/station.h:29
Cache intermediate results during a database transaction, to avoid hitting the database multiple time...
Definition: state.h:140
void add_station_vars(int id_station, Record &rec) override
Add all station variables (without attributes) to rec.
Coordinates.
Definition: types.h:337
dballe::sql::SQLiteStatement * smstm
Precompiled select mobile station query.
Definition: v7/sqlite/station.h:31
Key/value store where keys are strings and values are wreport variables.
Definition: record.h:17
dballe::sql::SQLiteStatement * istm
Precompiled insert query.
Definition: v7/sqlite/station.h:35
Definition: v7/station.h:20
Precompiled queries to manipulate the station table.
Definition: v7/sqlite/station.h:20
stations_t::iterator obtain_id(State &st, const StationDesc &desc) override
Get the station ID given latitude, longitude and mobile identifier.
void get_station_vars(int id_station, std::function< void(std::unique_ptr< wreport::Var >)> dest) override
Export station variables.
bool maybe_get_id(const StationDesc &st, int *id) override
Lookup the ID of a station, returning true if it was found, false if not.
stations_t::iterator lookup_id(State &st, int id) override
Look up a station give its ID.
SQLite statement.
Definition: sqlite.h:89
dballe::sql::SQLiteConnection & conn
DB connection.
Definition: v7/sqlite/station.h:26
Database connection.
Definition: sqlite.h:34
dballe::sql::SQLiteStatement * sstm
Precompiled select station details query.
Definition: v7/sqlite/station.h:33