mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
PGSQL: NoQuestionParams
git-svn-id: svn://ultimatepp.org/upp/trunk@13736 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c9930e79c8
commit
3706baffdb
2 changed files with 3 additions and 1 deletions
|
|
@ -512,7 +512,7 @@ bool PostgreSQLConnection::Execute()
|
|||
if(*s == '\'' || *s == '\"')
|
||||
s = PostgreSQLReadString(s, query);
|
||||
else {
|
||||
if(*s == '?') {
|
||||
if(*s == '?' && !noquestionparams) {
|
||||
if(pi >= param.GetCount()) {
|
||||
session.SetError("Invalid number of parameters", statement);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ private:
|
|||
String conns;
|
||||
bool keepalive;
|
||||
bool hex_blobs;
|
||||
bool noquestionparams = false;
|
||||
|
||||
VectorMap<String, String> pkache;
|
||||
|
||||
|
|
@ -86,6 +87,7 @@ public:
|
|||
|
||||
void SetCharset(byte chrset) { charset = chrset; }
|
||||
void KeepAlive(bool b = true) { keepalive = b; DoKeepAlive(); }
|
||||
void NoQuestionParams(bool b = true) { noquestionparams = b; }
|
||||
|
||||
String GetUser() { return PQuser(conn); }
|
||||
operator PGconn * () { return conn; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue