Skip to content
Snippets Groups Projects
Commit b18f0d6e authored by Stephen R. van den Berg's avatar Stephen R. van den Berg
Browse files

postgres: Drop unreferenced bindings.

Rev: lib/modules/Sql.pmod/postgres.pike:1.39
parent 0deabf63
Branches
Tags
No related merge requests found
/* /*
* This is part of the Postgres module for Pike. * This is part of the Postgres module for Pike.
* *
* $Id: postgres.pike,v 1.38 2008/08/25 12:04:53 srb Exp $ * $Id: postgres.pike,v 1.39 2008/08/29 11:54:40 srb Exp $
* *
*/ */
...@@ -405,6 +405,8 @@ int|object big_query(object|string q, mapping(string|int:mixed)|void bindings) ...@@ -405,6 +405,8 @@ int|object big_query(object|string q, mapping(string|int:mixed)|void bindings)
// Special parameter // Special parameter
continue; continue;
} }
if(search(q,name)<0)
continue; // Omit unused references
} }
from[rep]=name; from[rep]=name;
string rval; string rval;
...@@ -427,7 +429,7 @@ int|object big_query(object|string q, mapping(string|int:mixed)|void bindings) ...@@ -427,7 +429,7 @@ int|object big_query(object|string q, mapping(string|int:mixed)|void bindings)
if(rep--) { if(rep--) {
q=replace(q,from[..rep],to[..rep]); q=replace(q,from[..rep],to[..rep]);
} }
return ::big_query(q, paramValues); return paramValues ? ::big_query(q, paramValues): ::big_query(q);
} }
//! This is an alias for @[big_query()], since @[big_query()] already supports //! This is an alias for @[big_query()], since @[big_query()] already supports
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment