Query is now executed using std::async

This commit is contained in:
Eelke Klein 2016-12-27 21:22:49 +01:00
parent 3a8cc3d7f0
commit 0d30dc9080
4 changed files with 58 additions and 12 deletions

View file

@ -63,6 +63,7 @@ namespace Pgsql {
// int row;
// };
Result() = default;
Result(PGresult *result);
~Result();
@ -74,7 +75,7 @@ namespace Pgsql {
operator bool() const;
ExecStatusType getResultStatus();
ExecStatusType resultStatus();
std::string getResStatus();
@ -129,6 +130,11 @@ namespace Pgsql {
}
bool sendQuery(const char * query);
bool sendQuery(const QString &command)
{
return sendQuery(command.toUtf8().data());
}
std::unique_ptr<Result> getResult();
bool consumeInput();