]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Add AsyncRowFactory class
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 1 Aug 2021 12:55:48 +0000 (14:55 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 1 Aug 2021 20:36:23 +0000 (22:36 +0200)
commitbb93a6d93bc7effcd71e447c1dd97070f5281b2d
treef27559039b26e639732f3c8e5114365c42aeae57
parent6e3bf1be10a176e280db468deb098468a7bd45f8
Add AsyncRowFactory class

The extra class allow clients to define their RowFactory just taking a
Cursor or an AsyncCursor, which is easier if the program handles only
one type of connection (sync or async).

Using a Generic, the server-side cursors are now subclassed from  the
respective client-side cursor (sync and async), which allows to drop a
bit of implementation duplication.
docs/advanced/rows.rst
psycopg/psycopg/connection.py
psycopg/psycopg/cursor.py
psycopg/psycopg/rows.py
psycopg/psycopg/server_cursor.py
tests/typing_example.py