Merge pull request #1 from DaveRandom/fix/statement-descasync-arg
[mdref/mdref-pq] / pq / Cursor / __construct.md
1 # void pq\Cursor::__construct(pq\Connection $conn, int $flags, string $query[, bool $async = FALSE])
2
3 Declare a cursor.
4 See pq\Connection::declare().
5
6 ## Params:
7
8 * pq\Connection $connection
9 The connection on which the cursor should be declared.
10 * int $flags
11 See pq\Cursor constants.
12 * string $query
13 The query for ehich the cursor should be opened.
14 * bool $async
15 Whether to declare the cursor [asynchronously](pq/Connection/: Asynchronous Usage).
16
17 ## Throws:
18
19 * pq\Exception\InvalidArgumentException
20 * pq\Exception\BadMethodCallException
21 * pq\Exception\RuntimeException