libdballe  6.8
Public Member Functions | Static Public Member Functions | Data Fields
dballe::db::v5::Station Struct Reference

Precompiled queries to manipulate the station table. More...

#include <station.h>

Public Member Functions

 Station (db::Connection &conn)
 
void set_ident (const char *ident)
 Set the mobile station identifier input value for this ::dba_db_station. More...
 
int get_id ()
 Get the station ID given latitude, longitude and mobile identifier. More...
 
void get_data (int id)
 Get station information given a station ID. More...
 
int insert ()
 Insert a new station entry. More...
 
void update ()
 Update the information about a station entry.
 
void remove ()
 Remove a station record.
 
void dump (FILE *out)
 Dump the entire contents of the table to an output stream.
 

Static Public Member Functions

static void reset_db (db::Connection &conn)
 Clear (if applicable) and recreate the table structure in the database.
 

Data Fields

db::Connectionconn
 DB connection.
 
db::Sequenceseq_station
 Station ID sequence, when the DB requires it.
 
db::Statementsfstm
 Precompiled select fixed station query.
 
db::Statementsmstm
 Precompiled select mobile station query.
 
db::Statementsstm
 Precompiled select data by station id query.
 
db::Statementistm
 Precompiled insert query.
 
db::Statementustm
 Precompiled update query.
 
db::Statementdstm
 Precompiled delete query.
 
DBALLE_SQL_C_SINT_TYPE id
 Station ID SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE lat
 Station latitude SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE lon
 Station longitude SQL parameter.
 
char ident [64]
 Mobile station identifier SQL parameter.
 
SQLLEN ident_ind
 Mobile station identifier indicator.
 

Detailed Description

Precompiled queries to manipulate the station table.

Member Function Documentation

void dballe::db::v5::Station::get_data ( int  id)

Get station information given a station ID.

Parameters
idID of the station to query
int dballe::db::v5::Station::get_id ( )

Get the station ID given latitude, longitude and mobile identifier.

Returns
Resulting ID of the station
int dballe::db::v5::Station::insert ( )

Insert a new station entry.

Return values
idID of the newly inserted station
void dballe::db::v5::Station::set_ident ( const char *  ident)

Set the mobile station identifier input value for this ::dba_db_station.

Parameters
identValue to use for ident. NULL can be used to unset ident.

The documentation for this struct was generated from the following file: