DuroDBMS API
1.7
|
Functions | |
const char * | RDB_db_name (const RDB_database *dbp) |
RDB_environment * | RDB_db_env (RDB_database *dbp) |
RDB_database * | RDB_create_db_from_env (const char *name, RDB_environment *envp, RDB_exec_context *ecp) |
RDB_database * | RDB_get_db_from_env (const char *name, RDB_environment *envp, RDB_exec_context *ecp, RDB_transaction *txp) |
int | RDB_drop_db (RDB_database *dbp, RDB_exec_context *ecp) |
int | RDB_get_dbs (RDB_environment *envp, RDB_object *arrp, RDB_exec_context *ecp) |
#include <rel/rdb.h>
RDB_database* RDB_create_db_from_env | ( | const char * | name, |
RDB_environment * | envp, | ||
RDB_exec_context * | ecp | ||
) |
RDB_create_db_from_env creates a database from a database environment. If an error occurs, an error value is left in *ecp.
A pointer to the newly created database, or NULL if an error occurred.
The call may also fail for a system error.
RDB_environment* RDB_db_env | ( | RDB_database * | dbp | ) |
RDB_db_env returns a pointer to the database environment of the database specified by dbp.
A pointer to the database environment.
const char* RDB_db_name | ( | const RDB_database * | dbp | ) |
Return a pointer to the name of the database specified by dbp.
The name of the database.
int RDB_drop_db | ( | RDB_database * | dbp, |
RDB_exec_context * | ecp | ||
) |
RDB_drop_db deletes the database specified by dbp. The database must be empty.
If an error occurs, an error value is left in *ecp.
RDB_OK on success, RDB_ERROR if an error occurred.
The call may also fail for a system error.
References RDB_begin_tx().
RDB_database* RDB_get_db_from_env | ( | const char * | name, |
RDB_environment * | envp, | ||
RDB_exec_context * | ecp, | ||
RDB_transaction * | txp | ||
) |
RDB_get_db_from_env obtains a pointer to the database with name name in the environment specified by envp. If an error occurs, an error value is left in *ecp. txp may be NULL.
On success, a pointer to the database is returned. If an error occurred, NULL is returned.
The call may also fail for a system error.
int RDB_get_dbs | ( | RDB_environment * | envp, |
RDB_object * | arrp, | ||
RDB_exec_context * | ecp | ||
) |
After RDB_get_dbs has been called successfully, *arrp is an array of strings which contains the names of all databases in *envp.
arrp must either already be an array of RDB_STRING or having been initialized using RDB_init_obj().
RDB_OK on success, RDB_ERROR if an error occurred.
The call may fail for a system error.