libdballe
7.29
|
Precompiled queries to manipulate the station table. More...
#include <station.h>
Public Member Functions | |
SQLiteStation (dballe::sql::SQLiteConnection &conn) | |
SQLiteStation (const SQLiteStation &)=delete | |
SQLiteStation (const SQLiteStation &&)=delete | |
SQLiteStation & | operator= (const SQLiteStation &)=delete |
stations_t::iterator | lookup_id (State &st, int id) override |
Look up a station give its ID. More... | |
stations_t::iterator | obtain_id (State &st, const StationDesc &desc) override |
Get the station ID given latitude, longitude and mobile identifier. More... | |
void | get_station_vars (int id_station, std::function< void(std::unique_ptr< wreport::Var >)> dest) override |
Export station variables. | |
void | add_station_vars (int id_station, Record &rec) override |
Add all station variables (without attributes) to rec. More... | |
![]() | |
virtual | ~Station () |
Instantiate a Station object for this connection. | |
virtual stations_t::iterator | get_id (State &st, const StationDesc &desc) |
Get the station ID given latitude, longitude and mobile identifier. More... | |
void | dump (FILE *out) |
Dump the entire contents of the table to an output stream. | |
Protected Member Functions | |
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. | |
void | _dump (std::function< void(int, int, const Coords &coords, const char *ident)> out) override |
Protected Attributes | |
dballe::sql::SQLiteConnection & | conn |
DB connection. | |
dballe::sql::SQLiteStatement * | sfstm = nullptr |
Precompiled select fixed station query. | |
dballe::sql::SQLiteStatement * | smstm = nullptr |
Precompiled select mobile station query. | |
dballe::sql::SQLiteStatement * | sstm = nullptr |
Precompiled select station details query. | |
dballe::sql::SQLiteStatement * | istm = nullptr |
Precompiled insert query. | |
Precompiled queries to manipulate the station table.
|
overridevirtual |
Add all station variables (without attributes) to rec.
If the same variable exists in many different networks, the one with the highest priority will be used.
Implements dballe::db::v7::Station.
|
overridevirtual |
Look up a station give its ID.
It throws an exception if it does not exist.
Implements dballe::db::v7::Station.
|
overridevirtual |
Get the station ID given latitude, longitude and mobile identifier.
It creates the station record if it does not exist.
Implements dballe::db::v7::Station.