data.h File Reference


Detailed Description

Data table management used by the db module.

#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_datadba_db_data
 Precompiled query to manipulate the data table.

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 (dba_db_data ins, int rewrite)
 Insert an entry into the data table.


Function Documentation

dba_err dba_db_data_create ( dba_db  db,
dba_db_data ins 
)

Create a new dba_db_data.

Parameters:
db The dba_db this dba_db_data will access
Return values:
ins The newly created dba_db_data (it will need to be deallocated wth dba_db_data_delete())
Returns:
The error indicator for the function (See error.h)

References _dba_db_data::db, DBA_RUN_OR_GOTO, _dba_db_data::id_context, _dba_db_data::id_var, _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.

Parameters:
ins The dba_db_data to delete

References _dba_db_data::istm, and _dba_db_data::ustm.

dba_err dba_db_data_insert ( dba_db_data  ins,
int  rewrite 
)

Insert an entry into the data table.

Parameters:
ins The dba_db_data with the fields filled in with the data to insert.
rewrite If set to true, an existing data with the same context and dba_varcode will be overwritten; else, trying to replace an existing value will result in an error.
Returns:
The error indicator for the function (See error.h)

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.

Parameters:
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.

Parameters:
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.


Generated on Sun May 18 17:27:17 2008 for libdballe by  doxygen 1.5.5