pike.git / lib / modules / Sql.pmod / pgsql.pike

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:1032:   { cancelquery();    if(_c)    _c.sendterminate();    _c=0;   }      void destroy()   { close();   }    - private int reconnect(void|int force) + private void reconnect(void|int force)   { Thread.MutexKey connectmtxkey;    if(_c)    { reconnected++;    prepstmtused=0;    if(!force)    _c.sendterminate();    else    _c.close();    _c=0;    foreach(prepareds;;mapping tp)
pike.git/lib/modules/Sql.pmod/pgsql.pike:1078:    -(<"use_ssl","force_ssl","cache_autoprepared_statements","reconnect">);    string name;mixed value)    plugbuf+=({name,"\0",(string)value,"\0"});    plugbuf+=({"\0"});    int len=4;    foreach(plugbuf;;string s)    len+=sizeof(s);    plugbuf[0]=_c.plugint32(len);    _c.write(plugbuf);    PD("%O\n",plugbuf); -  { mixed err=catch(_decodemsg(readyforquery)); -  if(err) -  if(force) -  return 0; -  else -  throw(err); -  } +  _decodemsg(readyforquery);    PD("%O\n",_runtimeparameter);    if(force)    { lastmessage+=({sprintf("Reconnected to database %s",host_info())});    runcallback(backendpid,"_reconnect","");    } -  return 1; +    }      //! @decl void reload()   //!   //! For PostgreSQL this function performs the same function as @[resync()].   //!   //! @seealso   //! @[resync()], @[cancelquery()]   void reload()   { resync();