Query, Explain and Cancel are going throught the asyncdbconnection now.
Todo: Notice processing and error reporting.
This commit is contained in:
parent
fce51a7b7e
commit
a36bf5f7f4
11 changed files with 335 additions and 217 deletions
12
PgsqlConn.h
12
PgsqlConn.h
|
|
@ -129,15 +129,17 @@ namespace Pgsql {
|
|||
|
||||
class Canceller {
|
||||
public:
|
||||
Canceller() = default;
|
||||
Canceller(PGcancel *c);
|
||||
Canceller(const Canceller&) = delete;
|
||||
Canceller& operator=(const Canceller&) = delete;
|
||||
Canceller(Canceller&& rhs);
|
||||
Canceller& operator=(Canceller&& rhs);
|
||||
~Canceller();
|
||||
void cancel();
|
||||
|
||||
bool cancel(std::string *error);
|
||||
private:
|
||||
PGcancel *m_cancel;
|
||||
PGcancel *m_cancel = nullptr;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -187,12 +189,16 @@ namespace Pgsql {
|
|||
}
|
||||
|
||||
bool sendQuery(const char * query);
|
||||
bool sendQuery(const std::string &command)
|
||||
{
|
||||
return sendQuery(command.c_str());
|
||||
}
|
||||
bool sendQuery(const QString &command)
|
||||
{
|
||||
return sendQuery(command.toUtf8().data());
|
||||
}
|
||||
|
||||
std::unique_ptr<Result> getResult();
|
||||
std::shared_ptr<Result> getResult();
|
||||
|
||||
bool consumeInput();
|
||||
bool isBusy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue