mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 16:03:45 +00:00
feat(Core/Database): port TrinityCore database API (#5611)
This commit is contained in:
@@ -17,9 +17,11 @@ class DatabaseWorkerPool;
|
||||
|
||||
// A helper class to initiate all database worker pools,
|
||||
// handles updating, delays preparing of statements and cleans up on failure.
|
||||
class DatabaseLoader
|
||||
class AC_DATABASE_API DatabaseLoader
|
||||
{
|
||||
public:
|
||||
DatabaseLoader(std::string const& logger);
|
||||
|
||||
// Register a database to the loader (lazy implemented)
|
||||
template <class T>
|
||||
DatabaseLoader& AddDatabase(DatabaseWorkerPool<T>& pool, std::string const& name);
|
||||
@@ -49,6 +51,8 @@ private:
|
||||
// Returns false when there was an error.
|
||||
bool Process(std::queue<Predicate>& queue);
|
||||
|
||||
std::string const _logger;
|
||||
|
||||
std::queue<Predicate> _open, _prepare;
|
||||
std::stack<Closer> _close;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user