#include <dballe/db/internals.h>
#include <dballe/core/var.h>
Go to the source code of this file.
Data Structures | |
struct | _dba_db_data |
Precompiled query to manipulate the data table. More... | |
Typedefs | |
typedef struct _dba_db_data * | dba_db_data |
Functions | |
dba_err | dba_db_data_create (dba_db db, dba_db_data *ins) |
Create a new dba_db_data. | |
void | dba_db_data_delete (dba_db_data ins) |
Deletes a dba_db_data. | |
void | dba_db_data_set (dba_db_data ins, dba_var var) |
Set the input fields of a dba_db_data using the values in a dba_var. | |
void | dba_db_data_set_value (dba_db_data ins, const char *value) |
Set the value input field of a dba_db_data from a string. | |
dba_err | dba_db_data_insert_or_fail (dba_db_data ins) |
Insert an entry into the data table, failing on conflicts. | |
dba_err | dba_db_data_insert_or_ignore (dba_db_data ins, int *inserted) |
Insert an entry into the data table, ignoring conflicts. | |
dba_err | dba_db_data_insert_or_overwrite (dba_db_data ins) |
Insert an entry into the data table, overwriting on conflicts. |
typedef struct _dba_db_data* dba_db_data |
Precompiled query to manipulate the data table.
dba_err dba_db_data_create | ( | dba_db | db, | |
dba_db_data * | ins | |||
) |
Create a new dba_db_data.
db | The dba_db this dba_db_data will access |
ins | The newly created dba_db_data (it will need to be deallocated wth dba_db_data_delete()) |
References _dba_db_data::db, DBA_RUN_OR_GOTO, _dba_db_data::id_context, _dba_db_data::id_var, _dba_db_data::iistm, _dba_db_data::istm, _dba_db::server_type, _dba_db_data::ustm, _dba_db_data::value, and _dba_db_data::value_ind.
void dba_db_data_delete | ( | dba_db_data | ins | ) |
Deletes a dba_db_data.
ins | The dba_db_data to delete |
References _dba_db_data::istm, and _dba_db_data::ustm.
dba_err dba_db_data_insert_or_fail | ( | dba_db_data | ins | ) |
Insert an entry into the data table, failing on conflicts.
Trying to replace an existing value will result in an error.
ins | The dba_db_data with the fields filled in with the data to insert. |
References _dba_db_data::istm, and _dba_db_cursor::stm.
dba_err dba_db_data_insert_or_ignore | ( | dba_db_data | ins, | |
int * | inserted | |||
) |
Insert an entry into the data table, ignoring conflicts.
Trying to replace an existing value will do nothing.
ins | The dba_db_data with the fields filled in with the data to insert. |
References _dba_db_data::db, DBA_RUN_OR_RETURN, _dba_db_data::iistm, _dba_db_data::istm, _dba_db::server_type, and _dba_db_cursor::stm.
dba_err dba_db_data_insert_or_overwrite | ( | dba_db_data | ins | ) |
Insert an entry into the data table, overwriting on conflicts.
An existing data with the same context and dba_varcode will be overwritten.
ins | The dba_db_data with the fields filled in with the data to insert. |
References _dba_db_data::db, _dba_db_data::istm, _dba_db::server_type, _dba_db_cursor::stm, and _dba_db_data::ustm.
void dba_db_data_set | ( | dba_db_data | ins, | |
dba_var | var | |||
) |
Set the input fields of a dba_db_data using the values in a dba_var.
ins | The dba_db_data to fill in | |
var | The dba_var with the data to copy into ins |
References _dba_db_data::id_var.
void dba_db_data_set_value | ( | dba_db_data | ins, | |
const char * | value | |||
) |
Set the value input field of a dba_db_data from a string.
ins | The dba_db_data to fill in | |
value | The value to copy into ins |
References _dba_db_data::value, and _dba_db_data::value_ind.