void pq\Connection::exec(string $query[, callable $callback])Asynchronously execute an SQL query on the connection.
NOTE:
If pq\Connection::$unbuffered isTRUE, each call to pq\Connection::getResult() will generate a distinct pq\Result containing exactly one row.
string $query#callable $callback# as function(pq\Result $res#)callback to execute when the query finishes.
<?php
$connection = new pq\Connection;
$connection->execAsync("SELECT 1", function($res) {
//...
});
$connection->getResult();
?>