void pq\Connection::exec(string $query[, callable $callback])

Asynchronously execute an SQL query on the connection.

NOTE:
If pq\Connection::$unbuffered is TRUE, each call to pq\Connection::getResult() will generate a distinct pq\Result containing exactly one row.

Params:

Throws:

Example:


<?php

$connection 
= new pq\Connection;
$connection->execAsync("SELECT 1", function($res) {
    
//...
});
$connection->getResult();

?>