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

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

#include <attr.h>

Public Member Functions

 Attr (Connection &conn)
void set (const wreport::Var &var)
 Set the input fields using the values in a wreport::Var.
void set_value (const char *value)
 Set the value input field from a string.
void insert (bool replace)
 Insert an entry into the attr table.
void load (wreport::Var &var)
 Load from the database all the attributes for var.
void dump (FILE *out)
 Dump the entire contents of the table to an output stream.

Data Fields

db::Connectionconn
 DB connection.
db::Statementsstm
 Precompiled select statement.
db::Statementistm
 Precompiled insert statement.
db::Statementrstm
 Precompiled replace statement.
DBALLE_SQL_C_SINT_TYPE id_context
 context id SQL parameter
wreport::Varcode id_var
 variable id SQL parameter
wreport::Varcode type
 attribute id SQL parameter
char value [255]
 attribute value SQL parameter
SQLLEN value_ind
 attribute value indicator

Detailed Description

Precompiled queries to manipulate the attr table.

Member Function Documentation

void dballe::db::Attr::insert ( bool  replace)

Insert an entry into the attr table.

Parameters
replaceIf set to true, an existing attribute with the same context and wreport::Varcode will be overwritten; else, trying to replace an existing attribute will result in an error.
void dballe::db::Attr::load ( wreport::Var &  var)

Load from the database all the attributes for var.

Parameters
varwreport::Var to which the resulting attributes will be added
Returns
The error indicator for the function (See error.h)
void dballe::db::Attr::set ( const wreport::Var &  var)

Set the input fields using the values in a wreport::Var.

Parameters
varThe Var with the data to copy into ins
void dballe::db::Attr::set_value ( const char *  value)

Set the value input field from a string.

Parameters
valueThe value to copy into ins

Field Documentation

db::Connection& dballe::db::Attr::conn

DB connection.


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