typo & link fixes
[mdref/mdref-pq] / pq / Connection / getResult.md
1 # pq\Result pq\Connection::getResult()
2
3 Fetch the result of an [asynchronous](pq/Connection/: Asynchronous Usage) query.
4
5 If the query hasn't finished yet, the call will block until the result is available.
6
7 ## Params:
8
9 None.
10
11 ## Returns:
12
13 * NULL, if there has not been a query
14 * pq\Result, when the query has finished
15
16 ## Throws:
17
18 * pq\Exception\InvalidArgumentException
19 * pq\Exception\BadMethodCallException
20
21 ## Example:
22
23 <?php
24
25 $conn = new pq\Connection;
26 $conn->execAsync("SELECT 1");
27
28 // ...
29
30 $result = $conn->getResult();
31
32 ?>