2007-12-18 20:39:02 +00:00
|
|
|
#include <db_cxx.h>
|
2007-12-18 19:37:59 +00:00
|
|
|
|
|
|
|
int Dbc::close (void) {
|
|
|
|
DBC *dbc = this;
|
2007-12-21 19:59:31 +00:00
|
|
|
DbEnv *env = (DbEnv*)dbc->dbp->api_internal; // Must grab the env before closing the cursor.
|
2007-12-18 19:37:59 +00:00
|
|
|
int ret = dbc->c_close(dbc);
|
2007-12-21 15:32:21 +00:00
|
|
|
return env->maybe_throw_error(ret);
|
2007-12-18 19:37:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int Dbc::get(Dbt* key, Dbt *data, u_int32_t flags) {
|
|
|
|
DBC *dbc = this;
|
|
|
|
int ret = dbc->c_get(dbc, key, data, flags);
|
2007-12-21 15:32:21 +00:00
|
|
|
DbEnv *env = (DbEnv*)dbc->dbp->api_internal;
|
|
|
|
return env->maybe_throw_error(ret);
|
2007-12-18 19:37:59 +00:00
|
|
|
}
|