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:295:
//! The server has gone away, and the connection is dead. //! @endint //! //! @seealso //! @[is_open()] int ping() { return is_open() && !catch(c->start()->sendcmd(flushsend)) ? !!reconnected : -1; }
-
final
protected .pgsql_util.PGassist getsocket(void|int nossl) {
+
protected .pgsql_util.PGassist getsocket(void|int nossl) {
return .pgsql_util.PGassist(this,qportals,(int)nossl); } //! Cancels all currently running queries in this session. //! //! @seealso //! @[reload()], @[resync()] //! //! @note //! This function is PostgreSQL-specific, and thus it is not available
pike.git/lib/modules/Sql.pmod/pgsql.pike:516:
//! @note //! This function is PostgreSQL-specific, and thus it is not available //! through the generic SQL-interface. int setfetchlimit(void|int newfetchlimit) { int oldfetchlimit=_fetchlimit; if(!undefinedp(newfetchlimit) && newfetchlimit>=0) _fetchlimit=newfetchlimit; return oldfetchlimit; }
-
final
protected string glob2reg(string glob) {
+
protected string glob2reg(string glob) {
if(!glob||!sizeof(glob)) return "%"; return replace(glob,({"*","?","\\","%","_"}),({"%","_","\\\\","\\%","\\_"})); }
-
final
protected string a2nls(array(string) msg) {
+
protected string a2nls(array(string) msg) {
return msg*"\n"+"\n"; }
-
final
protected string pinpointerror(void|string query,void|string offset) {
+
protected string pinpointerror(void|string query,void|string offset) {
if(!query) return ""; int k=(int)offset; if(k<=0) return MARKSTART+query+MARKEND; return MARKSTART+(k>1?query[..k-2]:"")+MARKERROR+query[k-1..]+MARKEND; } protected void connect_cb() { PD("%O\n",_runtimeparameter);
pike.git/lib/modules/Sql.pmod/pgsql.pike:1457:
if(!old) old=({notify_cb}); if(selfnotify||args) old+=({selfnotify}); if(args) old+=args; notifylist[condition]=old; } }
-
final
protected void runcallback(int pid,string condition,string extrainfo) {
+
protected void runcallback(int pid,string condition,string extrainfo) {
array cb; if((cb=notifylist[condition]||notifylist[""]) && (pid!=backendpid || sizeof(cb)>1 && cb[1]))
-
cb[0]
(
pid,condition,extrainfo,@cb[2..]);
+
Thread.Thread(
cb[0]
,
pid,condition,extrainfo,@cb[2..]);
} //! @returns //! The given string, but escapes/quotes all contained magic characters //! according to the quoting rules of the current session for non-binary //! arguments in textual SQL-queries. //! //! @note //! Quoting must not be done for parameters passed in bindings. //!
pike.git/lib/modules/Sql.pmod/pgsql.pike:1706:
mapping m=mkmapping(colnames,row); delifzero(m,"is_shared"); delifzero(m,"has_index"); delifzero(m,"has_primarykey"); delifzero(m,"default"); ret+=({m}); } return ret; }
-
final
protected string trbackendst(int c) {
+
protected string trbackendst(int c) {
switch(c) { case 'I': return "idle"; case 'T': return "intransaction"; case 'E': return "infailedtransaction"; } return ""; } //! @returns //! The current commitstatus of the connection. Returns either one of: