pike.git
/
lib
/
modules
/
Sql.pmod
/
pgsql.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/pgsql.pike:197:
//! //! @seealso //! @[Postgres.postgres], @[Sql.Sql], @[postgres->select_db] protected void create(void|string _host, void|string _database, void|string _user, void|string _pass, void|mapping(string:mixed) _options) { pass = _pass; _pass = "CENSORED"; if(pass) String.secure(pass); user = _user; database = _database; host = _host || PGSQL_DEFAULT_HOST; options = _options || ([]);
-
if(
search
(host,":")
>=0
&& sscanf(_host,"%s:%d",host,port)!=2)
+
if(
has_value
(host,":") && sscanf(_host,"%s:%d",host,port)!=2)
ERROR("Error in parsing the hostname argument\n"); if(!port) port = PGSQL_DEFAULT_PORT; _querymutex=Thread.Mutex(); _stealmutex=Thread.Mutex(); reconnect(); } //! @decl string error() //!
pike.git/lib/modules/Sql.pmod/pgsql.pike:1489:
if(stringp(name)) { // Throws if mapping key is empty string if(name[0]!=':') name=":"+name; if(name[1]=='_') { // Special option parameter switch(name) { case ":_cache":forcecache=(int)value; break; } continue; }
-
if(
search
(q,name)
<0
)
+
if(
!has_value
(q,name))
continue; } from[rep]=name; string rval; if(multisetp(value)) { rval=sizeof(value) ? indices(value)[0] : ""; } else { if(zero_type(value)) paramValues[pi++]=UNDEFINED; // NULL