db_env_create(3)

NAME
db_env_create

SYNOPSIS

#include <db.h>

int db_env_create(DB_ENV **dbenvp, u_int32_t flags);

DESCRIPTION
db_env_create creates a DB_ENV handle, allocating memory and initializing its contents.

After creating the handle, you open a database using db_create and then DB->open(). To free the memory associated with the handle call *dbenvp->close() (or remove when that is ready.) The handle contains a field called app_private which is declared as type void*. This field is provided for the use of the application and is not further used by TokuDB.

PARAMETERS

dbenvp
    A pointer to a DB_ENV variable. The db_env_create function does something like *dbenvp=malloc(...).

flags
    The flags parameter must be set to 0.

RETURN VALUE

Returns zero on success. The following non-zero errors can be returned:

EINVAL
    You passed invalid parameters to this operation. In many cases EINVAL is not a very helpful error code, indicating only that you did something wrong.

CONFORMING TO
The TokuDB embedded database provides a subset of the functionality of the Berkeley DB. Programs that work with TokuDB probably work with with most versions of Berkeley DB with only recompilation or relinking. The database files are incompatible, however, so to convert from one library to the other you would need to dump the database with one library's tool and load it with the other's.

RESTRICTIONS

Restrictions: At most a few thousand databases per file.

AUTHOR
Tokutek, Inc.

COPYRIGHT
Copyright (c) 2007 Tokutek. All Rights Reserved.