forked from blue/lmdbal
lmdb calls are now compiled into .so
This commit is contained in:
parent
77ba8f9e7b
commit
6b475f615e
6 changed files with 118 additions and 35 deletions
|
@ -446,3 +446,64 @@ void LMDBAL::iStorage::transactionAborted(LMDBAL::TransactionID txn) const {
|
|||
* after the transaction is commited. Used just for optimisations.
|
||||
*/
|
||||
void LMDBAL::iStorage::handleDrop() {}
|
||||
|
||||
int LMDBAL::iStorage::_mdbOpen(MDB_txn *txn, unsigned int flags) {
|
||||
return mdb_dbi_open(txn, name.c_str(), flags, &dbi);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbPut(MDB_txn* txn, MDB_val& key, MDB_val& data, unsigned int flags) {
|
||||
return mdb_put(txn, dbi, &key, &data, flags);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbGet(MDB_txn* txn, MDB_val& key, MDB_val& data) const {
|
||||
return mdb_get(txn, dbi, &key, &data);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbDel(MDB_txn* txn, MDB_val& key) {
|
||||
return mdb_del(txn, dbi, &key, NULL);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbDel(MDB_txn* txn, MDB_val& key, MDB_val& data) {
|
||||
return mdb_del(txn, dbi, &key, &data);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbStat(MDB_txn* txn, MDB_stat& stat) const {
|
||||
return mdb_stat(txn, dbi, &stat);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbFlags(MDB_txn* txn, uint32_t& flags) const {
|
||||
return mdb_dbi_flags(txn, dbi, &flags);
|
||||
}
|
||||
|
||||
|
||||
int LMDBAL::iStorage::_mdbCursorOpen(MDB_txn* txn, MDB_cursor** cursor) const {
|
||||
return mdb_cursor_open(txn, dbi, cursor);
|
||||
}
|
||||
|
||||
void LMDBAL::iStorage::_mdbCursorClose(MDB_cursor *cursor) const {
|
||||
mdb_cursor_close(cursor);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbCursorGet(MDB_cursor* cursor, MDB_val& key, MDB_val& data, MDB_cursor_op operation) const {
|
||||
return mdb_cursor_get(cursor, &key, &data, operation);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbCursorSet(MDB_cursor* cursor, MDB_val& key) const {
|
||||
return mdb_cursor_get(cursor, &key, NULL, MDB_SET);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbCursorDel(MDB_cursor* cursor, unsigned int flags) {
|
||||
return mdb_cursor_del(cursor, flags);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbCursorPut(MDB_cursor* cursor, MDB_val& key, MDB_val& data, unsigned int flags) {
|
||||
return mdb_cursor_put(cursor, &key, &data, flags);
|
||||
}
|
||||
|
||||
int LMDBAL::iStorage::_mdbCursorRenew(MDB_txn* txn, MDB_cursor* cursor) const {
|
||||
return mdb_cursor_renew(txn, cursor);
|
||||
}
|
||||
|
||||
MDB_txn* LMDBAL::iStorage::_mdbCursorTxn(MDB_cursor* cursor) const {
|
||||
return mdb_cursor_txn(cursor);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue