#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 struct _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()) |
References _dba_db_attr::db, DBA_RUN_OR_GOTO, _dba_db_attr::id_context, _dba_db_attr::id_var, _dba_db_attr::istm, _dba_db_attr::rstm, _dba_db::server_type, _dba_db_attr::sstm, _dba_db_attr::type, _dba_db_attr::value, and _dba_db_attr::value_ind.
| void dba_db_attr_delete | ( | dba_db_attr | ins | ) |
Deletes a dba_db_attr.
| ins | The dba_db_attr to delete |
References _dba_db_attr::istm, _dba_db_attr::rstm, and _dba_db_attr::sstm.
| 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. |
References _dba_db_attr::db, _dba_db_attr::istm, _dba_db_attr::rstm, and _dba_db::server_type.
| 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 |
References DBA_RUN_OR_GOTO, _dba_db_attr::id_var, _dba_db_attr::sstm, _dba_db_attr::type, and _dba_db_attr::value.
| 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 |
References _dba_db_attr::type.
| 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 |
References _dba_db_attr::value, and _dba_db_attr::value_ind.
1.5.5