summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFederico Di Gregorio <fog@dndg.it>2018-10-07 13:54:24 +0200
committerFederico Di Gregorio <fog@dndg.it>2018-10-07 13:54:24 +0200
commit81addddaee2c690e925bb8f381e7bcb02ca97687 (patch)
tree43587104082ab6442cd98170ae15e19d8138bd81 /doc
parentccae5cae34051d6640ec6cbce6d9313778c509d3 (diff)
downloadpsycopg2-81addddaee2c690e925bb8f381e7bcb02ca97687.tar.gz
Added connection.get_native_connection()
Diffstat (limited to 'doc')
-rw-r--r--doc/src/connection.rst16
1 files changed, 15 insertions, 1 deletions
diff --git a/doc/src/connection.rst b/doc/src/connection.rst
index 2910f30..545cd72 100644
--- a/doc/src/connection.rst
+++ b/doc/src/connection.rst
@@ -768,7 +768,7 @@ The ``connection`` class
support.
- .. rubric:: Methods related to asynchronous support.
+ .. rubric:: Methods related to asynchronous support
.. versionadded:: 2.2.0
@@ -813,6 +813,20 @@ The ``connection`` class
Return `!True` if the connection is executing an asynchronous operation.
+ .. rubric:: Interoperation with other C API modules
+
+ .. method:: get_native_connection()
+
+ Return the internal `PGconn*` wrapped in a PyCapsule object. This is
+ only useful for passing the `libpq` raw connection associated to this
+ connection object to other C-level modules that may have a use for it.
+
+ .. seealso:: Python C API `Capsules`__ docs.
+
+ .. __: https://docs.python.org/3.1/c-api/capsule.html
+
+ .. versionadded:: 2.8
+
.. testcode::
:hide: