summaryrefslogtreecommitdiff
path: root/src/core/Database/AdhocStatement.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Database/AdhocStatement.h')
-rw-r--r--src/core/Database/AdhocStatement.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/core/Database/AdhocStatement.h b/src/core/Database/AdhocStatement.h
new file mode 100644
index 0000000000..b527efcada
--- /dev/null
+++ b/src/core/Database/AdhocStatement.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C)
+ *
+ * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
+ */
+
+#ifndef _ADHOCSTATEMENT_H
+#define _ADHOCSTATEMENT_H
+
+#include <ace/Future.h>
+#include "SQLOperation.h"
+
+typedef ACE_Future<QueryResult> QueryResultFuture;
+/*! Raw, ad-hoc query. */
+class BasicStatementTask : public SQLOperation
+{
+ public:
+ BasicStatementTask(const char* sql);
+ BasicStatementTask(const char* sql, QueryResultFuture result);
+ ~BasicStatementTask();
+
+ bool Execute();
+
+ private:
+ const char* m_sql; //- Raw query to be executed
+ bool m_has_result;
+ QueryResultFuture m_result;
+};
+
+#endif \ No newline at end of file