aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database/SQLOperation.h
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-09-19 12:36:48 +0200
committerMachiavelli <none@none>2010-09-19 12:36:48 +0200
commitb50c931d6eddb9493c494bc09900c79893b0bf1a (patch)
tree52e63c8c5fa5734ae58577b035838553b2ab3b60 /src/server/shared/Database/SQLOperation.h
parent0982719f5fa3266adf655dc7e1541177e40c3b93 (diff)
Core/DBLayer: Move QueryHolder and BasicStatement operations to their own file and remove SQLOperation.cpp from revision control
--HG-- branch : trunk
Diffstat (limited to 'src/server/shared/Database/SQLOperation.h')
-rw-r--r--src/server/shared/Database/SQLOperation.h57
1 files changed, 1 insertions, 56 deletions
diff --git a/src/server/shared/Database/SQLOperation.h b/src/server/shared/Database/SQLOperation.h
index e5d7f7c7180..77f73a95a82 100644
--- a/src/server/shared/Database/SQLOperation.h
+++ b/src/server/shared/Database/SQLOperation.h
@@ -22,8 +22,7 @@
#include <ace/Method_Request.h>
#include <ace/Activation_Queue.h>
-#include "Common.h"
-#include "Callback.h"
+#include "QueryResult.h"
//- Forward declare (don't include header to prevent circular includes)
class PreparedStatement;
@@ -73,58 +72,4 @@ class SQLOperation : public ACE_Method_Request
MySQLConnection* m_conn;
};
-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;
-};
-
-
-
-class SQLQueryHolder
-{
- friend class SQLQueryHolderTask;
- private:
- typedef std::pair<SQLElementData, SQLResultSetUnion> SQLResultPair;
- std::vector<SQLResultPair> m_queries;
- public:
- SQLQueryHolder() {}
- ~SQLQueryHolder();
- bool SetQuery(size_t index, const char *sql);
- bool SetPQuery(size_t index, const char *format, ...) ATTR_PRINTF(3,4);
- bool SetPreparedQuery(size_t index, PreparedStatement* stmt);
- void SetSize(size_t size);
- QueryResult GetResult(size_t index);
- PreparedQueryResult GetPreparedResult(size_t index);
- void SetResult(size_t index, ResultSet* result);
- void SetPreparedResult(size_t index, PreparedResultSet* result);
-};
-
-typedef ACE_Future<SQLQueryHolder*> QueryResultHolderFuture;
-
-class SQLQueryHolderTask : public SQLOperation
-{
- private:
- SQLQueryHolder * m_holder;
- QueryResultHolderFuture m_result;
-
- public:
- SQLQueryHolderTask(SQLQueryHolder *holder, QueryResultHolderFuture res)
- : m_holder(holder), m_result(res){};
- bool Execute();
-
-};
-
-
#endif