Db* open_db(DbEnv *penv, const char *filename, DBTYPE dbtype, u_int32_t oflags, u_int32_t set_flags, int mode=0644, DbTxn *txn=NULL, u_int32_t cflags=0, const char *dbname=NULL)
Helper function to open a database and register it into dbstl for the calling thread.
Users still need to register it in any other thread using it if it is shared by multiple threads, via register_db() function. Users don't need to delete or free the memory of the returned object, dbstl will take care of that. When you don't use dbstl::open_db() but explicitly call DB C++ API to open a database, you must new the Db object, rather than create it on stack, and you must delete the Db object by yourself.