forked from blue/lmdbal
Cursors refactoring part one
This commit is contained in:
parent
ef86d0adf9
commit
bfb1d007ad
19 changed files with 824 additions and 677 deletions
|
@ -19,14 +19,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "base.h"
|
||||
#include "icursor.h"
|
||||
|
||||
namespace LMDBAL {
|
||||
class iStorage;
|
||||
class StorageCommon;
|
||||
class CursorCommon;
|
||||
|
||||
class Transaction {
|
||||
friend class Base;
|
||||
friend class iStorage;
|
||||
friend class StorageCommon;
|
||||
public:
|
||||
explicit Transaction();
|
||||
explicit Transaction(Transaction&& other);
|
||||
|
@ -44,10 +44,10 @@ protected:
|
|||
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*/
|
||||
std::map<uint32_t, iCursor*> cursors; /**<\brief a collection of cursors curently opened under this transaction*/
|
||||
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, CursorCommon*> 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