Move query result helper class to maxsql

Added some asserts to ensure the class is used correctly.
This commit is contained in:
Esa Korhonen
2019-01-09 17:50:20 +02:00
parent 07cbda7771
commit b4d91d4b9a
8 changed files with 230 additions and 190 deletions

View File

@ -15,11 +15,11 @@
#include <functional>
#include <string>
#include <memory>
#include <maxscale/monitor.hh>
#include <maxbase/stopwatch.hh>
#include <maxsql/mariadb.hh>
#include <maxscale/monitor.hh>
#include "server_utils.hh"
class QueryResult;
class MariaDBServer;
// Server pointer array
typedef std::vector<MariaDBServer*> ServerArray;
@ -187,7 +187,7 @@ public:
* @param errmsg_out Where to store an error message if query fails. Can be null.
* @return Pointer to query results, or an empty pointer on failure
*/
std::unique_ptr<QueryResult> execute_query(const std::string& query, std::string* errmsg_out = NULL);
std::unique_ptr<mxq::QueryResult> execute_query(const std::string& query, std::string* errmsg_out = NULL);
/**
* execute_cmd_ex with query retry ON.