#include <dballe/db/internals.h>
#include <dballe/core/var.h>
Go to the source code of this file.
Data Structures | |
struct | _dba_db_attr |
Precompiled queries to manipulate the attr table. More... | |
Typedefs | |
typedef _dba_db_attr * | dba_db_attr |
Precompiled queries to manipulate the attr table. | |
Functions | |
dba_err | dba_db_attr_create (dba_db db, dba_db_attr *ins) |
Create a new dba_db_attr. | |
void | dba_db_attr_delete (dba_db_attr ins) |
Deletes a dba_db_attr. | |
void | dba_db_attr_set (dba_db_attr ins, dba_var var) |
Set the input fields of a dba_db_attr using the values in a dba_var. | |
void | dba_db_attr_set_value (dba_db_attr ins, const char *value) |
Set the value input field of a dba_db_attr from a string. | |
dba_err | dba_db_attr_insert (dba_db_attr ins, int replace) |
Insert an entry into the attr table. | |
dba_err | dba_db_attr_load (dba_db_attr ins, dba_var var) |
Load from the database all the attributes for var. |
dba_err dba_db_attr_create | ( | dba_db | db, | |
dba_db_attr * | ins | |||
) |
Create a new dba_db_attr.
db | The dba_db this dba_db_attr will access |
ins | The newly created dba_db_attr (it will need to be deallocated wth dba_db_attr_delete()) |
void dba_db_attr_delete | ( | dba_db_attr | ins | ) |
dba_err dba_db_attr_insert | ( | dba_db_attr | ins, | |
int | replace | |||
) |
Insert an entry into the attr table.
ins | The dba_db_attr with the fields filled in with the data to insert. | |
replace | If set to true, an existing attribute with the same context and dba_varcode will be overwritten; else, trying to replace an existing attribute will result in an error. |
dba_err dba_db_attr_load | ( | dba_db_attr | ins, | |
dba_var | var | |||
) |
Load from the database all the attributes for var.
ins | dba_db_attr to use for the query, with the context ID filled in | |
var | dba_var to which the resulting attributes will be added |
void dba_db_attr_set | ( | dba_db_attr | ins, | |
dba_var | var | |||
) |
Set the input fields of a dba_db_attr using the values in a dba_var.
ins | The dba_db_attr to fill in | |
var | The dba_var with the data to copy into ins |
void dba_db_attr_set_value | ( | dba_db_attr | ins, | |
const char * | value | |||
) |
Set the value input field of a dba_db_attr from a string.
ins | The dba_db_attr to fill in | |
value | The value to copy into ins |