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
|
|
@ -1,5 +1,6 @@
|
|||
#include "PgsqlConn.h"
|
||||
#include "Pgsql_declare.h"
|
||||
#include "Pgsql_Params.h"
|
||||
#include <stdexcept>
|
||||
|
||||
|
||||
|
|
@ -158,6 +159,15 @@ bool Connection::sendQuery(const char *query)
|
|||
return res == 1;
|
||||
}
|
||||
|
||||
bool Connection::sendQueryParams(const char * command, const Params ¶ms)
|
||||
{
|
||||
int res = PQsendQueryParams(conn, command, params.size(), params.types(),
|
||||
params.values(), params.lengths(), params.formats(),
|
||||
0); // text format
|
||||
|
||||
return res == 1;
|
||||
}
|
||||
|
||||
std::shared_ptr<Result> Connection::getResult()
|
||||
{
|
||||
PGresult *r = PQgetResult(conn);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue