forked from blue/lmdbal
external transaction methods for storage
This commit is contained in:
parent
f39d44890a
commit
e2dbea21d1
19 changed files with 273 additions and 58 deletions
src
|
@ -82,14 +82,22 @@ uint32_t LMDBAL::iStorage::count() const {
|
|||
|
||||
void LMDBAL::iStorage::throwDuplicateOrUnknown(int rc, TransactionID txn, const std::string& key) const {
|
||||
abortTransaction(txn);
|
||||
throwDuplicateOrUnknown(rc, key);
|
||||
}
|
||||
|
||||
void LMDBAL::iStorage::throwNotFoundOrUnknown(int rc, LMDBAL::TransactionID txn, const std::string& key) const {
|
||||
abortTransaction(txn);
|
||||
throwNotFoundOrUnknown(rc, key);
|
||||
}
|
||||
|
||||
void LMDBAL::iStorage::throwDuplicateOrUnknown(int rc, const std::string& key) const {
|
||||
if (rc == MDB_KEYEXIST)
|
||||
throwDuplicate(key);
|
||||
else
|
||||
throwUnknown(rc);
|
||||
}
|
||||
|
||||
void LMDBAL::iStorage::throwNotFoundOrUnknown(int rc, LMDBAL::TransactionID txn, const std::string& key) const {
|
||||
abortTransaction(txn);
|
||||
void LMDBAL::iStorage::throwNotFoundOrUnknown(int rc, const std::string& key) const {
|
||||
if (rc == MDB_NOTFOUND)
|
||||
throwNotFound(key);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue