libdballe
7.21
|
Precompiled queries to manipulate the station table. More...
#include <station.h>
Public Member Functions | |
PostgreSQLStation (dballe::sql::PostgreSQLConnection &conn) | |
PostgreSQLStation (const PostgreSQLStation &)=delete | |
PostgreSQLStation (const PostgreSQLStation &&)=delete | |
PostgreSQLStation & | operator= (const PostgreSQLStation &)=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::PostgreSQLConnection & | conn |
DB connection. | |
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.