bg
BangDB Environment API - BangDB = NoSQL + AI + Stream

BangDB Environment API

chevron

BangDBEnv Type

API for client application development

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

C++

Selected

Java

Selected

create the BangDBEnv 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();

Creating BangDBEnv object by calling the constructor which takes DBParam as argument

public BangDBEnv(DBParam dbp) The DBParam is a structure which defines the parameters for the database. Please see more on this at bangdb DBParam
To verify the database
public DBParam verifyDatabase(String dbName) It returns DBParam for the database "dbname"
To close the database
public synchronized void closeDatabase(CloseType dbclose) ClosedType is enum with following values; DEFAULT_AT_CLIENT, CONSERVATIVE_AT_SERVER, OPTIMISTIC_AT_SERVER, CLEANCLOSE_AT_SERVER, SIMPLECLOSE_AT_SERVER, DEFAULT_AT_SERVER, Please see more on this at bangdb common
To get host IP and PORT
public String getHost() public String getPort()
To Open Database
public synchronized BangDBDatabase openDatabase(String dbName, DBParam dbparam)