On this page

BangDB Environment API

BangDB Environment Type

API for client application development

To get started with BangDB Server, we need to create the environment for the BangDB



create the BangDB Env object by calling the constructor which takes DBParam as argument

 BangDBEnv(DBParam dbp); 
The DBParam is structure which defines the parameters for database.
You may leave it NULL for defualt to be used or initialise it for overriding the param values To verify the database
 DBParam *verifyDatabase(const char *dbname); 
It returns DBParam for the database “dbname”, user should delete the reference as required to get the host ip and port
char *getHost();
char *getPort();
to close the database [ note: this can be done by just deleting the database object as well ]
 void closeDatabase(BangDBDatabase *bdb, CloseType dbclose = DEFAULT_AT_CLIENT); 
finally to delete the env object
 virtual ~BangDBEnv(); 



Was this article helpful to you? Yes No