forked from blue/lmdbal
Cursors get closed after transaction that open them
This commit is contained in:
parent
68ea7df6a9
commit
e88efb458f
12 changed files with 225 additions and 56 deletions
|
@ -19,6 +19,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "base.h"
|
||||
#include "icursor.h"
|
||||
|
||||
namespace LMDBAL {
|
||||
class iStorage;
|
||||
|
@ -40,11 +41,13 @@ public:
|
|||
protected:
|
||||
Transaction(TransactionID txn, const Base* parent);
|
||||
void reset();
|
||||
void closeCursors();
|
||||
|
||||
protected:
|
||||
TransactionID txn; /**<\brief Transaction inner handler*/
|
||||
bool active; /**<\brief Transaction state*/
|
||||
const Base* parent; /**<\brief Pointer to the database this transaction belongs to*/
|
||||
TransactionID txn; /**<\brief Transaction inner handler*/
|
||||
bool active; /**<\brief Transaction state*/
|
||||
const Base* parent; /**<\brief Pointer to the database this transaction belongs to*/
|
||||
std::map<uint32_t, iCursor*> cursors; /**<\brief a collection of cursors curently opened under this transaction*/
|
||||
};
|
||||
|
||||
class WriteTransaction : public Transaction {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue