Database connection.
Definition: postgresql.h:240
dballe::sql::PostgreSQLConnection & conn
DB connection.
Definition: v6/postgresql/station.h:24
void dump(FILE *out) override
Dump the entire contents of the table to an output stream.
int get_id(int lat, int lon, const char *ident=nullptr) override
Get the station ID given latitude, longitude and mobile identifier.
Definition: v6/postgresql/station.h:18
Definition: v6/postgresql/station.h:67
bool maybe_get_id(int lat, int lon, const char *ident, int *id)
Lookup the ID of a station, returning true if it was found, false if not.
int obtain_id(int lat, int lon, const char *ident=nullptr, bool *inserted=NULL) override
Get the station ID given latitude, longitude and mobile identifier.
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.