Can use the parameter list in the query window now.
Still requires extensive testing for all possible types.
This commit is contained in:
parent
aefc9eb7ba
commit
3af26d915e
14 changed files with 461 additions and 242 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define ASYNCDBCONNECTION_H
|
||||
|
||||
#include "PgsqlConn.h"
|
||||
#include "Pgsql_Params.h"
|
||||
#include "win32event.h"
|
||||
#include "connectionconfig.h"
|
||||
#include <QElapsedTimer>
|
||||
|
|
@ -48,6 +49,7 @@ public:
|
|||
If the command gives multiple results on_result will be called for each result.
|
||||
*/
|
||||
bool send(const std::string &command, on_result_callback on_result);
|
||||
bool send(const std::string &command, Pgsql::Params params, on_result_callback on_result);
|
||||
|
||||
bool cancel();
|
||||
|
||||
|
|
@ -56,12 +58,16 @@ private:
|
|||
class Command {
|
||||
public:
|
||||
std::string command;
|
||||
Pgsql::Params params;
|
||||
on_result_callback on_result;
|
||||
|
||||
Command() = default;
|
||||
Command(const std::string &cmd, on_result_callback cb)
|
||||
: command(cmd), on_result(cb)
|
||||
{}
|
||||
Command(const std::string &cmd, Pgsql::Params &&p, on_result_callback cb)
|
||||
: command(cmd), params(p), on_result(cb)
|
||||
{}
|
||||
};
|
||||
|
||||
/// Contains all the members accessed by the thread
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue