#include <dce/dce.h>
#include <dce/dbif.h>
void dce_db_fetch(
dce_db_handle_t handle,
void *key,
void *data,
error_status_t *status);
The dce_db_fetch() routine retrieves data from the backing store that is identified by the handle parameter, which was obtained from dce_db_open(). It is a general retrieval routine, interpreting the key parameter according to the type of index with which the backing store was created.
The data parameter is shown as a pointer to an arbitrary data type. In actual use it will be the address of the backing-store-specific data type.
After calling dce_db_fetch(), it may be necessary to free some memory, if the call was made outside of an RPC, on the server side. This is done by calling rpc_sm_client_free(). (Inside an RPC the memory is allocated through rpc_sm_allocate(), and is automatically freed.)
Programs that call dce_db_fetch() outside of a server operation (for instance, if a server does some backing store initialization, or in a standalone program) must call rpc_sm_enable_allocate() first. Indeed, every thread that calls dce_db_fetch() must do rpc_sm_allocate(), but in the server side of an RPC, this is already done.
Functions: dce_db_fetch_by_name(3dce), dce_db_fetch_by_uuid(3dce), dce_db_free(3dce), dce_db_open(3dce).