libdballe
9.11
|
Precompiled queries to manipulate the station table. More...
#include <station.h>
Public Member Functions | |
SQLiteStation (v7::Transaction &tr, dballe::sql::SQLiteConnection &conn) | |
SQLiteStation (const SQLiteStation &)=delete | |
SQLiteStation (const SQLiteStation &&)=delete | |
SQLiteStation & | operator= (const SQLiteStation &)=delete |
DBStation | lookup (Tracer<> &trc, int id_station) override |
Lookup station data by ID. | |
int | maybe_get_id (Tracer<> &trc, const dballe::DBStation &st) override |
Get the station ID given latitude, longitude and mobile identifier. More... | |
int | insert_new (Tracer<> &trc, const dballe::DBStation &desc) override |
Insert a new station in the database, without checking if it already exists. More... | |
void | get_station_vars (Tracer<> &trc, int id_station, std::function< void(std::unique_ptr< wreport::Var >)> dest) override |
Export station variables. | |
void | add_station_vars (Tracer<> &trc, int id_station, DBValues &values) override |
Add all station variables (without attributes) to values. More... | |
void | run_station_query (Tracer<> &trc, const v7::StationQueryBuilder &qb, std::function< void(const dballe::DBStation &)>) override |
![]() | |
Station (v7::Transaction &tr) | |
virtual void | run_station_query (Tracer<> &trc, const v7::StationQueryBuilder &qb, std::function< void(const dballe::DBStation &station)>)=0 |
Run a station query, iterating on the resulting stations. | |
void | dump (FILE *out) |
Dump the entire contents of the table to an output stream. | |
Protected Member Functions | |
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 * | istm = nullptr |
Precompiled insert query. | |
dballe::sql::SQLiteStatement * | ssdstm = nullptr |
Precompiled select station data query. | |
![]() | |
v7::Transaction & | tr |
Precompiled queries to manipulate the station table.
|
overridevirtual |
Add all station variables (without attributes) to values.
If the same variable exists in many different networks, the one with the highest priority will be used.
Implements dballe::db::v7::Station.
|
overridevirtual |
Insert a new station in the database, without checking if it already exists.
Returns the ID of the new station
Implements dballe::db::v7::Station.
|
overridevirtual |
Get the station ID given latitude, longitude and mobile identifier.
It returns MISSING_INT if it does not exist.
Implements dballe::db::v7::Station.