m6w6 / ext-pq

PostgreSQL client library (libpq) binding
BSD 2-Clause "Simplified" License
39 stars 7 forks source link

execAsync - gets another results #9

Closed ParkFramework closed 8 years ago

ParkFramework commented 8 years ago
$sream = new pq\Connection;

$sream->execAsync("SELECT 'my'", function($res)
{
    print_r($res->fetchRow());
});

$sream->exec("SELECT 'another'");

Print:

Array
(
    [0] => my
)
Array
(
    [0] => another
)

This normal behavior?

m6w6 commented 8 years ago

Hi! Thanks for the report.

If you mean that exec completes the previous execAsync, than I think yes.

If you mean that the callback is called twice, I'd have to investigate :)

ParkFramework commented 8 years ago

I mean that the callback is called twice.

ParkFramework commented 8 years ago

Thank you, i see a lot of work done. When you plan to build a new version for PHP 7?

We started to use EventLoop based http://docs.php.net/manual/en/class.evio.php I use in coroutines (yield) asynchronous queries pq, well will test a new version pq :)

m6w6 commented 8 years ago

If nothing exceptional happens, we should see a release soon.

We started to use EventLoop based

Does EvIO work with pq\Connection::$socket?

ParkFramework commented 8 years ago

Does EvIO work with pq\Connection::$socket?

Yes, works fine, we use for notification poll, instead socket_select()

m6w6 commented 8 years ago

Just released 1.0.1 and 2.0.1!

Thanks!