diff options
Diffstat (limited to 'src/server/database/Database/PreparedStatement.h')
-rw-r--r-- | src/server/database/Database/PreparedStatement.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/server/database/Database/PreparedStatement.h b/src/server/database/Database/PreparedStatement.h index af4db9c310e..9fde41e6f2a 100644 --- a/src/server/database/Database/PreparedStatement.h +++ b/src/server/database/Database/PreparedStatement.h @@ -18,11 +18,14 @@ #ifndef _PREPAREDSTATEMENT_H #define _PREPAREDSTATEMENT_H +#include "DatabaseEnvFwd.h" #include "Define.h" -#include "SQLOperation.h" -#include <future> -#include <vector> +#include <array> +#include <string> #include <variant> +#include <vector> + +class MySQLConnection; struct PreparedStatementData { @@ -112,18 +115,11 @@ private: }; //- Lower-level class, enqueuable operation -class TC_DATABASE_API PreparedStatementTask : public SQLOperation +class TC_DATABASE_API PreparedStatementTask { - public: - PreparedStatementTask(PreparedStatementBase* stmt, bool async = false); - ~PreparedStatementTask(); - - bool Execute() override; - PreparedQueryResultFuture GetFuture() { return m_result->get_future(); } - - protected: - PreparedStatementBase* m_stmt; - bool m_has_result; - PreparedQueryResultPromise* m_result; +public: + static PreparedQueryResult Query(MySQLConnection* conn, PreparedStatementBase* stmt); + static bool Execute(MySQLConnection* conn, PreparedStatementBase* stmt); }; + #endif |