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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user