1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-30 05:23:50 +03:00

some progess on Db::associate. addresses #226

git-svn-id: file:///svn/tokudb@1395 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Rich Prohaska
2007-12-27 22:10:59 +00:00
parent b4d0b55930
commit c8232e91a7
2 changed files with 8 additions and 0 deletions

View File

@@ -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);
}

View File

@@ -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;