pq/Cursor docs
[mdref/mdref-pq] / pq / Connection / declareAsync.md
1 # pq\Cursor pq\Connection::declareAsync(string $name, int $flags, string $query)
2
3 [Asynchronously](pq/Connection/: Asynchronous Usage) declare a cursor for a query.
4
5 > ***NOTE***:
6 If pq\Connection::$unbuffered is TRUE, each call to pq\Connection::getResult() will generate a distinct pq\Result containing exactly one row.
7
8 ## Params:
9
10 * string $name
11 The identifying name of the cursor.
12 * int $flags
13 Any combination of pq\Cursor constants.
14 * string $query
15 The query for which to open a cursor.
16
17 ## Returns:
18
19 * pq\Cursor, an open cursor instance.
20
21 ## Throws:
22
23 * pq\Exception\InvalidArgumentException
24 * pq\Exception\RuntimeException
25 * pq\Exception\BadMethodCallException