Commit c8232e91 authored by Rich Prohaska's avatar Rich Prohaska

some progess on Db::associate. addresses #226

git-svn-id: file:///svn/tokudb@1395 c7de825b-a66e-492c-adef-691d508d4ae1
parent b4d0b559
......@@ -104,3 +104,10 @@ int Db::set_bt_compare(bt_compare_fcn_type bt_compare_fcn) {
int ret = the_db->set_bt_compare(the_db, bt_compare_fcn);
return the_Env->maybe_throw_error(ret);
}
// open question: how to handle the callback type conversions?
int Db::associate(DbTxn *txnid, Db *secondary, int (*callback)(Db *secondary, const Dbt *key, const Dbt *data, Dbt *result), u_int32_t flags) {
int ret = the_db->associate(the_db, txnid->get_DB_TXN(), secondary->get_DB(), 0, flags);
return the_Env->maybe_throw_error(ret);
}
......@@ -107,6 +107,7 @@ class Db {
int set_pagesize(u_int32_t);
int remove(const char *file, const char *database, u_int32_t flags);
int set_bt_compare(bt_compare_fcn_type bt_compare_fcn);
int associate(DbTxn *, Db *, int (*)(Db *, const Dbt *, const Dbt *, Dbt *), u_int32_t);
private:
DB *the_db;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment