pike.git / lib / modules / __builtin.pmod / Sql.pmod / Connection.pike

version» Context lines:

pike.git/lib/modules/__builtin.pmod/Sql.pmod/Connection.pike:1238:   //!   //! Sql.Connection db = Sql.Connection("...");   //! Sql.Promise q1 = db->promise_query("SELECT 42")->max_records(10);   //! Sql.Promise q2 = db->promise_query("SELECT :foo::INT", (["foo":2]));   //!   //! array(Concurrent.Future) all = ({ q1, q2 })->future();   //!   //! // To get a callback for each of the requests   //!   //! all->on_success(lambda (Sql.FutureResult resp) { - //! werror("Got result %O from %O\n", resp->data, resp->query); + //! werror("Got result %O from %O\n", resp->get(), resp->query);   //! });   //! all->on_failure(lambda (Sql.FutureResult resp) {   //! werror("Request %O failed: %O\n", resp->query,   //! resp->status_command_complete);   //! });   //!   //! // To get a callback when all of the requests are done. In this case   //! // on_failure will be called if any of the requests fails.   //!   //! Concurrent.Future all2 = Concurrent.results(all);