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

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

#include <context.h>

Public Member Functions

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

Data Fields

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

Get context information given a context ID.

Parameters:
idID of the context to query

Get the context id for the current context data.

Returns:
The database ID, or -1 if no existing context entry matches the given values

Insert a new context in the database.

Returns:
The ID of the newly inserted context

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: