libdballe
5.18
|
Precompiled query to manipulate the data table. More...
#include <data.h>
Public Member Functions | |
Data (Connection &conn) | |
void | set (const wreport::Var &var) |
Set the value input fields using a wreport::Var. | |
void | set_value (const char *value) |
Set the value input fields using a string value. | |
void | insert_or_fail () |
Insert an entry into the data table, failing on conflicts. | |
bool | insert_or_ignore () |
Insert an entry into the data table, ignoring conflicts. | |
void | insert_or_overwrite () |
Insert an entry into the data table, overwriting on conflicts. | |
void | dump (FILE *out) |
Dump the entire contents of the table to an output stream. | |
Data Fields | |
db::Connection & | conn |
DB connection. | |
db::Statement * | istm |
Precompiled insert statement. | |
db::Statement * | ustm |
Precompiled update statement. | |
db::Statement * | iistm |
Precompiled insert or ignore statement. | |
DBALLE_SQL_C_SINT_TYPE | id_context |
Context ID SQL parameter. | |
wreport::Varcode | id_var |
Variable type SQL parameter. | |
char | value [255] |
Variable value SQL parameter. | |
SQLLEN | value_ind |
Variable value indicator. |
Precompiled query to manipulate the data table.
void dballe::db::Data::insert_or_fail | ( | ) |
Insert an entry into the data table, failing on conflicts.
Trying to replace an existing value will result in an error.
bool dballe::db::Data::insert_or_ignore | ( | ) |
Insert an entry into the data table, ignoring conflicts.
Trying to replace an existing value will do nothing.
Insert an entry into the data table, overwriting on conflicts.
An existing data with the same context and ::dba_varcode will be overwritten.
DB connection.