typo, parameter and type fixes
[mdref/mdref-pq] / pq / Transaction.md
1 # class pq\Transaction
2
3 A database transaction.
4
5 > ***NOTE:***
6 Transactional properties like pq\Transaction::$isolation, pq\Transaction::$readonly and pq\Transaction::$deferrable can be changed after the transaction begun and the first query has been executed. Doing this will lead to appropriate `SET TRANSACTION` queries.
7
8 ## Constants:
9
10 * READ_COMMITTED
11 Transaction isolation level where only rows committed before the transaction began can be seen.
12 * REPEATABLE_READ
13 Transaction isolation level where only rows committed before the first query was executed in this transaction.
14 * SERIALIZABLE
15 Transaction isolation level that guarantees serializable repeatability which might lead to serialization_failure on high concurrency.
16
17 ## Properties:
18
19 * public (readonly) pq\Connection $connection
20 The connection the transaction was started on.
21 * public int $isolation = pq\Transaction::READ_COMMITTED
22 The transaction isolation level.
23 * public bool $readonly = FALSE
24 Whether this transaction performs read only queries.
25 * public bool $deferrable = FALSE
26 Whether the transaction is deferrable. See pq\Connection::startTransaction().
27