From b130df94dfb4a7e604d28ed0cd0c33b783c15da8 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Sat, 7 May 2022 17:49:43 +0200 Subject: [PATCH] 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. --- docs/advanced/pipeline.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.2