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

version» Context lines:

pike.git/lib/modules/Sql.pmod/rsql.pike:180:   array(mapping(string:mixed)) list_fields(string ... args)   {    return do_request('f', args);   }      string quote(string s)   {    return do_request('q');   }    - int|object big_query(object|string q, mapping(string|int:mixed)|void bindings) + protected class RemoteResult(protected function(int,mixed:mixed) do_request, +  protected mixed qid)   { -  if(bindings) -  q=.sql_util.emulate_bindings(q,bindings,this); -  -  mixed qid = do_request('Q', q); -  return qid && class { -  -  protected function(int,mixed:mixed) do_request; -  protected mixed qid; -  +     void destroy()    {    do_request('Z', qid);    }       int|array(string|int) fetch_row()    {    return do_request('R', qid);    }   
pike.git/lib/modules/Sql.pmod/rsql.pike:225:       int eof()    {    return do_request('e', qid);    }       void seek(int skip)    {    do_request('S', ({qid,skip}));    } + }    -  void create(function(int,mixed:mixed) d_r, mixed i) + int|object big_query(object|string q, mapping(string|int:mixed)|void bindings)   { -  do_request = d_r; -  qid = i; +  if(bindings) +  q=.sql_util.emulate_bindings(q,bindings,this); +  +  mixed qid = do_request('Q', q); +  return qid && RemoteResult(do_request, qid);   }    -  }(do_request, qid); + int|object big_typed_query(object|string q, +  mapping(string|int:mixed)|void bindings) + { +  if(bindings) +  q=.sql_util.emulate_bindings(q,bindings,this); +  +  mixed qid = do_request('Q', ({ "big_typed_query", q })); +  return qid && RemoteResult(do_request, qid);   }    -  + int|object streaming_query(object|string q, +  mapping(string|int:mixed)|void bindings) + { +  if(bindings) +  q=.sql_util.emulate_bindings(q,bindings,this); +  +  mixed qid = do_request('Q', ({ "streaming_query", q })); +  return qid && RemoteResult(do_request, qid); + } +  + int|object streaming_typed_query(object|string q, +  mapping(string|int:mixed)|void bindings) + { +  if(bindings) +  q=.sql_util.emulate_bindings(q,bindings,this); +  +  mixed qid = do_request('Q', ({ "streaming_typed_query", q })); +  return qid && RemoteResult(do_request, qid); + } +    array(mapping(string:mixed)) query(mixed ... args)   {    return do_request('@', args);   }      int insert_id()   {    return do_request('#');   }