diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-16 11:04:02 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-16 12:46:35 +0000 |
commit | d50ed488074a3b809bf98fb1e6971bc295ba31c3 (patch) | |
tree | 333d66d7ddf85b5704ccd64a99283862aebbc9f8 /doc/src | |
parent | b5d80b609d6f1b0922ed51d6182ff137f1b3ba3e (diff) | |
download | psycopg2-d50ed488074a3b809bf98fb1e6971bc295ba31c3.tar.gz |
Added readonly and deferrable attributes
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/connection.rst | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/doc/src/connection.rst b/doc/src/connection.rst index d554ce6..53f908f 100644 --- a/doc/src/connection.rst +++ b/doc/src/connection.rst @@ -386,12 +386,6 @@ The ``connection`` class The function must be invoked with no transaction in progress. - .. note:: - - There is currently no builtin method to read the current value for - the parameters: use :sql:`SHOW default_transaction_...` to read - the values from the backend. - .. seealso:: |SET TRANSACTION|_ for further details about the behaviour of the transaction parameters in the server. @@ -475,6 +469,35 @@ The ``connection`` class transaction_isolation`. Usually the default value is `READ COMMITTED`, but this may be changed in the server configuration. + This value is now entirely separate from the `autocommit` + property: in previous version, if `!autocommit` was set to `!True` + this property would have returned + `~psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT`; it will now + return the server isolation level. + + + .. attribute:: readonly + + Return or set the read-only status for the current session. Available + values are `!True` (new transactions will be in read-only mode), + `!False` (new transactions will be writable), `!None` (use the default + configured for the server by :sql:`default_transaction_read_only`). + + .. versionadded:: 2.7 + + + .. attribute:: deferrable + + Return or set the `deferrable status`__ for the current session. + Available values are `!True` (new transactions will be in deferrable + mode), `!False` (new transactions will be in non deferrable mode), + `!None` (use the default configured for the server by + :sql:`default_transaction_deferrable`). + + .. __: `SET TRANSACTION`_ + + .. versionadded:: 2.7 + .. method:: set_isolation_level(level) |