@@ -206,7 +206,8 @@ def fetchall(self, sql, parameters=None):
206
206
yield row
207
207
208
208
def get_cursor (self , * a , ** kw ):
209
- """Return a :py:class:`~postgres.CursorContextManager` that uses our connection pool.
209
+ """Return a :py:class:`~postgres.CursorContextManager` that uses our
210
+ connection pool.
210
211
211
212
This is what :py:meth:`~postgres.Postgres.execute`,
212
213
:py:meth:`~postgres.Postgres.fetchone`, and
@@ -219,7 +220,8 @@ def get_cursor(self, *a, **kw):
219
220
return CursorContextManager (self .pool , * a , ** kw )
220
221
221
222
def get_transaction (self , * a , ** kw ):
222
- """Return a :py:class:`~postgres.TransactionContextManager` that uses our connection pool.
223
+ """Return a :py:class:`~postgres.TransactionContextManager` that uses
224
+ our connection pool.
223
225
224
226
Use this when you want a series of statements to be part of one
225
227
transaction, but you don't need fine-grained control over the
@@ -229,7 +231,8 @@ def get_transaction(self, *a, **kw):
229
231
return TransactionContextManager (self .pool , * a , ** kw )
230
232
231
233
def get_connection (self ):
232
- """Return a :py:class:`~postgres.ConnectionContextManager` that uses our connection pool.
234
+ """Return a :py:class:`~postgres.ConnectionContextManager` that uses
235
+ our connection pool.
233
236
234
237
Use this when you want to take advantage of connection pooling, but
235
238
otherwise need full control, for example, to do complex things with
@@ -296,7 +299,8 @@ def __exit__(self, *exc_info):
296
299
297
300
298
301
class TransactionContextManager (object ):
299
- """Instantiated once per :py:func:`~postgres.Postgres.get_transaction` call.
302
+ """Instantiated once per :py:func:`~postgres.Postgres.get_transaction`
303
+ call.
300
304
301
305
The return value of :py:func:`TransactionContextManager.__enter__` is a
302
306
:py:class:`psycopg2.extras.RealDictCursor`. Any positional and keyword
0 commit comments