attr.h File Reference


Detailed Description

Attribute 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_attr
 Precompiled queries to manipulate the attr table. More...

Typedefs

typedef _dba_db_attrdba_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.


Function Documentation

dba_err dba_db_attr_create ( dba_db  db,
dba_db_attr ins 
)

Create a new dba_db_attr.

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

void dba_db_attr_delete ( dba_db_attr  ins  ) 

Deletes a dba_db_attr.

Parameters:
ins The dba_db_attr to delete

dba_err dba_db_attr_insert ( dba_db_attr  ins,
int  replace 
)

Insert an entry into the attr table.

Parameters:
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.
Returns:
The error indicator for the function (See error.h)

dba_err dba_db_attr_load ( dba_db_attr  ins,
dba_var  var 
)

Load from the database all the attributes for var.

Parameters:
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
Returns:
The error indicator for the function (See error.h)

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.

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

Parameters:
ins The dba_db_attr to fill in
value The value to copy into ins


Generated on Fri Jun 22 15:34:03 2007 for libdballe-db by  doxygen 1.5.2