1
0
Fork 0
forked from blue/lmdbal

Cursors refactoring part one

This commit is contained in:
Blue 2024-12-25 19:19:32 +02:00
parent ef86d0adf9
commit bfb1d007ad
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
19 changed files with 824 additions and 677 deletions

View file

@ -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 {