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

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

#include <context.h>

Public Member Functions

 Context (v5::DB &db)
 
int get_id ()
 Get the context id for the current context data. More...
 
void get_data (int id)
 Get context information given a context ID. More...
 
int obtain_station_info ()
 Get the context id for a station info context. More...
 
int insert ()
 Insert a new context in the database. More...
 
void remove ()
 Remove a context record.
 
void dump (FILE *out)
 Dump the entire contents of the table to an output stream.
 

Data Fields

v5::DBdb
 DB connection.
 
db::Statementsstm
 Precompiled select statement.
 
db::Statementsdstm
 Precompiled select data statement.
 
db::Statementistm
 Precompiled insert statement.
 
db::Statementdstm
 Precompiled delete statement.
 
DBALLE_SQL_C_SINT_TYPE id
 Context ID SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE id_station
 Station ID SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE id_report
 Report ID SQL parameter.
 
SQL_TIMESTAMP_STRUCT date
 Date SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE ltype1
 First level type SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE l1
 Level L1 SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE ltype2
 Second level type SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE l2
 Level L2 SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE pind
 Time range type SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE p1
 Time range P1 SQL parameter.
 
DBALLE_SQL_C_SINT_TYPE p2
 Time range P2 SQL parameter.
 

Detailed Description

Precompiled queries to manipulate the context table.

Member Function Documentation

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

Get context information given a context ID.

Parameters
idID of the context to query
int dballe::db::v5::Context::get_id ( )

Get the context id for the current context data.

Returns
The database ID, or -1 if no existing context entry matches the given values
int dballe::db::v5::Context::insert ( )

Insert a new context in the database.

Returns
The ID of the newly inserted context
int dballe::db::v5::Context::obtain_station_info ( )

Get the context id for a station info context.

id_station and id_report must be filled in for the query.

Returns
The database ID

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