libdballe  7.7
Public Member Functions | Protected Member Functions | Protected Attributes
dballe::db::odbc::ODBCLevTrV6 Struct Reference

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

#include <levtr.h>

Inheritance diagram for dballe::db::odbc::ODBCLevTrV6:
dballe::db::sql::LevTr

Public Member Functions

 ODBCLevTrV6 (ODBCConnection &conn)
 
 ODBCLevTrV6 (const LevTr &)=delete
 
 ODBCLevTrV6 (const LevTr &&)=delete
 
ODBCLevTrV6operator= (const ODBCLevTrV6 &)=delete
 
int obtain_id (const Level &lev, const Trange &tr) override
 Return the ID for the given Level and Trange, adding it to the database if it does not already exist.
 
const DBRow * read (int id) override
 Read the LevTr data for an id, returns nullptr if not found.
 
void read_all (std::function< void(const DBRow &)> dest) override
 
void dump (FILE *out) override
 Dump the entire contents of the table to an output stream.
 
- Public Member Functions inherited from dballe::db::sql::LevTr
virtual void read_all (std::function< void(const DBRow &)> dest)=0
 Read the contents of the LevTr table.
 

Protected Member Functions

int insert ()
 Insert a new lev_tr in the database. More...
 
int get_id ()
 Get the lev_tr id for the current lev_tr data. More...
 
void remove ()
 Remove a lev_tr record.
 

Protected Attributes

ODBCConnectionconn
 DB connection.
 
db::Sequenceseq_lev_tr = nullptr
 lev_tr ID sequence, for databases that need it
 
ODBCStatementsstm = nullptr
 Precompiled select statement.
 
ODBCStatementsdstm = nullptr
 Precompiled select data statement.
 
ODBCStatementistm = nullptr
 Precompiled insert statement.
 
ODBCStatementdstm = nullptr
 Precompiled delete statement.
 
DBRow working_row
 

Detailed Description

Precompiled queries to manipulate the lev_tr table.

Member Function Documentation

int dballe::db::odbc::ODBCLevTrV6::get_id ( )
protected

Get the lev_tr id for the current lev_tr data.

Returns
The database ID, or -1 if no existing lev_tr entry matches the given values
int dballe::db::odbc::ODBCLevTrV6::insert ( )
protected

Insert a new lev_tr in the database.

Returns
The ID of the newly inserted lev_tr

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