Query is now executed using std::async
This commit is contained in:
parent
3a8cc3d7f0
commit
0d30dc9080
4 changed files with 58 additions and 12 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue