From: Denis Laxalde Date: Sat, 7 May 2022 15:49:43 +0000 (+0200) Subject: docs: mention that conn.pipeline() yields a Pipeline object X-Git-Tag: 3.1~120^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b130df94dfb4a7e604d28ed0cd0c33b783c15da8;p=thirdparty%2Fpsycopg.git docs: mention that conn.pipeline() yields a Pipeline object While reading the section, it is otherwise not obvious to understand where to get the Pipeline object from. --- diff --git a/docs/advanced/pipeline.rst b/docs/advanced/pipeline.rst index d13f95e0a..ef9b73e34 100644 --- a/docs/advanced/pipeline.rst +++ b/docs/advanced/pipeline.rst @@ -48,8 +48,8 @@ Pipeline mode usage ------------------- Psycopg supports the pipeline mode via the `Connection.pipeline()` method. The -method is a context manager: at the end of the ``with`` block, the connection -resumes the normal operation mode. +method is a context manager: entering the ``with`` block yields a `Pipeline` +object, at the end of block, the connection resumes the normal operation mode. Within the pipeline block, you can use one or more cursors to execute several operations, using `~Cursor.execute()` and `~Cursor.executemany()`. Unlike in