Cursors refactoring part one
All checks were successful
Main LMDBAL workfow / Test LMDBAL with qt5 (push) Successful in 1m4s
Main LMDBAL workfow / Test LMDBAL with qt6 (push) Successful in 1m22s
Main LMDBAL workfow / Release documentation (push) Successful in 29s

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

View file

@ -34,7 +34,7 @@
namespace LMDBAL {
class iStorage;
class StorageCommon;
class Transaction;
class WriteTransaction;
@ -51,7 +51,7 @@ typedef MDB_txn* TransactionID; /**<\brief I'm going to
typedef uint32_t SizeType; /**<\brief All LMDBAL sizes are uint32_t*/
class Base {
friend class iStorage;
friend class StorageCommon;
friend class Transaction;
friend class WriteTransaction;
public:
@ -84,7 +84,7 @@ public:
LMDBAL::Cache<K, V>* getCache(const std::string& storageName);
private:
typedef std::map<std::string, LMDBAL::iStorage*> Storages; /**<\brief Storage and Cache pointers are saved in the std::map*/
typedef std::map<std::string, LMDBAL::StorageCommon *> Storages; /**<\brief Storage and Cache pointers are saved in the std::map*/
typedef std::map<TransactionID, Transaction*> Transactions; /**<\brief Piblic transaction IDs are saved in the std::set*/
void commitTransaction(TransactionID id);
@ -136,7 +136,7 @@ LMDBAL::Storage<K, V>* LMDBAL::Base::addStorage(const std::string& storageName,
throw Opened(name, "add storage " + storageName);
Storage<K, V>* storage = new Storage<K, V>(this, storageName, duplicates);
std::pair<Storages::const_iterator, bool> pair = storages.insert(std::make_pair(storageName, (iStorage*)storage));
std::pair<Storages::const_iterator, bool> pair = storages.insert(std::make_pair(storageName, (StorageCommon *)storage));
if (!pair.second)
throw StorageDuplicate(name, storageName);
@ -164,7 +164,7 @@ LMDBAL::Cache<K, V> * LMDBAL::Base::addCache(const std::string& storageName) {
throw Opened(name, "add cache " + storageName);
Cache<K, V>* cache = new Cache<K, V>(this, storageName, false);
std::pair<Storages::const_iterator, bool> pair = storages.insert(std::make_pair(storageName, (iStorage*)cache));
std::pair<Storages::const_iterator, bool> pair = storages.insert(std::make_pair(storageName, (StorageCommon *)cache));
if (!pair.second)
throw StorageDuplicate(name, storageName);