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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:230:   private int copyinprogress;   int _fetchlimit;   int _alltext;      #ifdef NO_LOCKING   int _qmtxkey;   #else   Thread.MutexKey _qmtxkey;   #endif    - string query; +    string _portalname;      int _bytesreceived;   int _rowsreceived;   int _interruptable;   int _inflight;   int _portalbuffersize; -  + array _params;   string _statuscmdcomplete; -  + string _query;   array(array(mixed)) _datarows;   array(mapping(string:mixed)) _datarowdesc=({});   array(int) _datatypeoid;   #ifdef USEPGsql   int _buffer;   #endif      private object fetchmutex;      protected string _sprintf(int type, void|mapping flags)   { string res=UNDEFINED;    switch(type)    { case 'O':    res=sprintf("pgsql_result numrows: %d eof: %d querylock: %d" -  " inflight: %d\nportalname: %O datarows: %d\n" -  "query: %O\n" -  "laststatus: %s\n", +  " inflight: %d\nportalname: %O datarows: %d laststatus: %s\n",    numrows,eoffound,!!_qmtxkey,_inflight,    _portalname,sizeof(_datarowdesc), -  query, +     _statuscmdcomplete||"");    break;    }    return res;   }    - void create(object pgsqlsess,string _query,int fetchlimit, -  int portalbuffersize,int alltyped) + void create(object pgsqlsess,string query,int fetchlimit, +  int portalbuffersize,int alltyped,array params)   { _pgsqlsess = pgsqlsess; -  query = _query; +  _query = query;    _datarows = ({ }); numrows = UNDEFINED;    fetchmutex = Thread.Mutex();    _fetchlimit=fetchlimit;    _portalbuffersize=portalbuffersize;    _alltext = !alltyped; -  +  _params = params;    steallock();   }      //! Returns the command-complete status for this query.   //!   //! @seealso   //! @[affected_rows()]   //!   //! @note   //! This function is PostgreSQL-specific, and thus it is not available