|
|
@ -40,22 +40,15 @@ namespace MySQL |
|
|
|
class DatabaseQueryOperation : public DatabaseOperation |
|
|
|
class DatabaseQueryOperation : public DatabaseOperation |
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
DatabaseQueryOperation(const char* query, DatabaseCallback callback = NULL): DatabaseOperation(), _callback(callback) |
|
|
|
DatabaseQueryOperation(const char* query, DatabaseCallback callback = NULL): DatabaseOperation(), _callback(callback), _query(query) {} |
|
|
|
{ |
|
|
|
|
|
|
|
_query = new char[strlen(query)]; |
|
|
|
|
|
|
|
strcpy(_query, const_cast<char *>(query)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~DatabaseQueryOperation() |
|
|
|
~DatabaseQueryOperation() {} |
|
|
|
{ |
|
|
|
|
|
|
|
delete[] _query; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Execute(); |
|
|
|
void Execute(); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
DatabaseCallback _callback; |
|
|
|
DatabaseCallback _callback; |
|
|
|
char* _query; |
|
|
|
std::string _query; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
typedef Util::SynchronisedQueue<DatabaseOperation*> DatabaseWorkQueue; |
|
|
|
typedef Util::SynchronisedQueue<DatabaseOperation*> DatabaseWorkQueue; |
|
|
|