Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
DatabaseQueue.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef _DATABASEQUEUE_H
7#define _DATABASEQUEUE_H
8
9#include <memory>
10
11class DatabaseWorker;
12class MySQLConnection;
13class SQLOperation;
14
15namespace Skyfire
16{
17 namespace Asio
18 {
20 }
21
23 {
24 public:
27
28 void enqueue(SQLOperation* operation);
29 int run(MySQLConnection* connection);
30 void close();
31 void wait();
32
33 private:
34 struct Impl;
35
36 std::unique_ptr<Impl> _impl;
37
39 void BindConnection(MySQLConnection* connection);
40 void ClearConnection();
41
42 friend class ::DatabaseWorker;
43
44 DatabaseQueue(DatabaseQueue const& right) = delete;
45 DatabaseQueue& operator=(DatabaseQueue const& right) = delete;
46 };
47}
48
49#endif
std::unique_ptr< Impl > _impl
void BindConnection(MySQLConnection *connection)
DatabaseQueue(DatabaseQueue const &right)=delete
DatabaseQueue & operator=(DatabaseQueue const &right)=delete
void enqueue(SQLOperation *operation)
Asio::IoContextExecutor & GetExecutor()
int run(MySQLConnection *connection)