Flush writes to server after every send.
This commit is contained in:
parent
6bea0390f8
commit
0b34675449
@ -266,22 +266,30 @@ protected:
|
||||
|
||||
int Send(const char *queryText)
|
||||
{
|
||||
return PQsendQuery(connection_, queryText);
|
||||
int rv = PQsendQuery(connection_, queryText);
|
||||
StartWrite();
|
||||
return rv;
|
||||
}
|
||||
|
||||
int SendQueryParams(const char *command, const int nParams, const char * const *paramValues)
|
||||
{
|
||||
return PQsendQueryParams(connection_, command, nParams, NULL, paramValues, NULL, NULL, 0);
|
||||
int rv = PQsendQueryParams(connection_, command, nParams, NULL, paramValues, NULL, NULL, 0);
|
||||
StartWrite();
|
||||
return rv;
|
||||
}
|
||||
|
||||
int SendPrepare(const char *name, const char *command, const int nParams)
|
||||
{
|
||||
return PQsendPrepare(connection_, name, command, nParams, NULL);
|
||||
int rv = PQsendPrepare(connection_, name, command, nParams, NULL);
|
||||
StartWrite();
|
||||
return rv;
|
||||
}
|
||||
|
||||
int SendPreparedQuery(const char *name, int nParams, const char * const *paramValues)
|
||||
{
|
||||
return PQsendQueryPrepared(connection_, name, nParams, paramValues, NULL, NULL, 0);
|
||||
int rv = PQsendQueryPrepared(connection_, name, nParams, paramValues, NULL, NULL, 0);
|
||||
StartWrite();
|
||||
return rv;
|
||||
}
|
||||
|
||||
int Cancel()
|
||||
@ -289,6 +297,7 @@ protected:
|
||||
PGcancel* pgCancel = PQgetCancel(connection_);
|
||||
char errbuf[256];
|
||||
int result = PQcancel(pgCancel, errbuf, 256);
|
||||
StartWrite();
|
||||
PQfreeCancel(pgCancel);
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user