libdballe
7.7
|
Precompiled queries to manipulate the station table. More...
#include <station.h>
Public Member Functions | |
ODBCStationBase (ODBCConnection &conn) | |
ODBCStationBase (const ODBCStationBase &)=delete | |
ODBCStationBase (const ODBCStationBase &&)=delete | |
ODBCStationBase & | operator= (const ODBCStationBase &)=delete |
int | get_id (int lat, int lon, const char *ident=NULL) override |
Get the station ID given latitude, longitude and mobile identifier. More... | |
int | obtain_id (int lat, int lon, const char *ident=NULL, bool *inserted=NULL) override |
Get the station ID given latitude, longitude and mobile identifier. More... | |
void | get_station_vars (int id_station, int id_report, 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... | |
void | dump (FILE *out) override |
Dump the entire contents of the table to an output stream. | |
![]() | |
virtual | ~Station () |
Instantiate a Station object for this connection. | |
Protected Member Functions | |
void | set_ident (const char *ident) |
Set the mobile station identifier input value for this ::dba_db_station. More... | |
void | get_data (int id) |
Get station information given a station ID. More... | |
void | update () |
Update the information about a station entry. | |
void | remove () |
Remove a station record. | |
void | impl_add_station_vars (const char *query, int id_station, Record &rec) |
Protected Attributes | |
ODBCConnection & | conn |
DB connection. | |
db::Sequence * | seq_station |
Station ID sequence, when the DB requires it. | |
ODBCStatement * | sfstm |
Precompiled select fixed station query. | |
ODBCStatement * | smstm |
Precompiled select mobile station query. | |
ODBCStatement * | sstm |
Precompiled select data by station id query. | |
ODBCStatement * | istm |
Precompiled insert query. | |
ODBCStatement * | ustm |
Precompiled update query. | |
ODBCStatement * | dstm |
Precompiled delete query. | |
int | id |
Station ID SQL parameter. | |
int | lat |
Station latitude SQL parameter. | |
int | lon |
Station longitude SQL parameter. | |
char | ident [64] |
Mobile station identifier SQL parameter. | |
SQLLEN | ident_ind |
Mobile station identifier indicator. | |
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::sql::Station.
Reimplemented in dballe::db::odbc::ODBCStationV6.
|
protected |
Get station information given a station ID.
id | ID of the station to query |
|
overridevirtual |
Get the station ID given latitude, longitude and mobile identifier.
It throws an exception if it does not exist.
Implements dballe::db::sql::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::sql::Station.
|
protected |
Set the mobile station identifier input value for this ::dba_db_station.
ident | Value to use for ident. NULL can be used to unset ident. |