Create a :class:`~transaction.Transaction` object. Refer to `PostgreSQL documentation`_ on the meaning of transaction parameters. :param isolation: Transaction isolation mode, can be one of: `'serializable'`, `'repeatable_read'`,
(self, *, isolation=None, readonly=False,
deferrable=False)
| 277 | return self._protocol.get_settings() |
| 278 | |
| 279 | def transaction(self, *, isolation=None, readonly=False, |
| 280 | deferrable=False): |
| 281 | """Create a :class:`~transaction.Transaction` object. |
| 282 | |
| 283 | Refer to `PostgreSQL documentation`_ on the meaning of transaction |
| 284 | parameters. |
| 285 | |
| 286 | :param isolation: Transaction isolation mode, can be one of: |
| 287 | `'serializable'`, `'repeatable_read'`, |
| 288 | `'read_uncommitted'`, `'read_committed'`. If not |
| 289 | specified, the behavior is up to the server and |
| 290 | session, which is usually ``read_committed``. |
| 291 | |
| 292 | :param readonly: Specifies whether or not this transaction is |
| 293 | read-only. |
| 294 | |
| 295 | :param deferrable: Specifies whether or not this transaction is |
| 296 | deferrable. |
| 297 | |
| 298 | .. _`PostgreSQL documentation`: |
| 299 | https://www.postgresql.org/docs/ |
| 300 | current/static/sql-set-transaction.html |
| 301 | """ |
| 302 | self._check_open() |
| 303 | return transaction.Transaction(self, isolation, readonly, deferrable) |
| 304 | |
| 305 | def is_in_transaction(self): |
| 306 | """Return True if Connection is currently inside a transaction. |