libdballe 9.6
|
Public Member Functions | |
Station (v7::Transaction &tr) | |
virtual DBStation | lookup (Tracer<> &trc, int id_station)=0 |
Lookup station data by ID. | |
virtual int | maybe_get_id (Tracer<> &trc, const dballe::DBStation &st)=0 |
Get the station ID given latitude, longitude and mobile identifier. | |
virtual int | insert_new (Tracer<> &trc, const dballe::DBStation &desc)=0 |
Insert a new station in the database, without checking if it already exists. | |
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. | |
virtual void | get_station_vars (Tracer<> &trc, int id_station, std::function< void(std::unique_ptr< wreport::Var >)> dest)=0 |
Export station variables. | |
virtual void | add_station_vars (Tracer<> &trc, int id_station, DBValues &values)=0 |
Add all station variables (without attributes) to values. | |
void | dump (FILE *out) |
Dump the entire contents of the table to an output stream. | |
Protected Member Functions | |
virtual void | _dump (std::function< void(int, int, const Coords &coords, const char *ident)> out)=0 |
Protected Attributes | |
v7::Transaction & | tr |
|
pure virtual |
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.
Implemented in dballe::db::v7::mysql::MySQLStation, dballe::db::v7::postgresql::PostgreSQLStation, and dballe::db::v7::sqlite::SQLiteStation.
|
pure virtual |
Export station variables.
Implemented in dballe::db::v7::mysql::MySQLStation, dballe::db::v7::postgresql::PostgreSQLStation, and dballe::db::v7::sqlite::SQLiteStation.
|
pure virtual |
Insert a new station in the database, without checking if it already exists.
Returns the ID of the new station
Implemented in dballe::db::v7::mysql::MySQLStation, dballe::db::v7::postgresql::PostgreSQLStation, and dballe::db::v7::sqlite::SQLiteStation.
Lookup station data by ID.
Implemented in dballe::db::v7::mysql::MySQLStation, dballe::db::v7::postgresql::PostgreSQLStation, and dballe::db::v7::sqlite::SQLiteStation.
|
pure virtual |
Get the station ID given latitude, longitude and mobile identifier.
It returns MISSING_INT if it does not exist.
Implemented in dballe::db::v7::mysql::MySQLStation, dballe::db::v7::postgresql::PostgreSQLStation, and dballe::db::v7::sqlite::SQLiteStation.