]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Add row_factory as connection attribute and connect argument
authorDenis Laxalde <denis.laxalde@dalibo.com>
Fri, 12 Feb 2021 09:31:30 +0000 (10:31 +0100)
committerDenis Laxalde <denis.laxalde@dalibo.com>
Fri, 12 Feb 2021 10:34:35 +0000 (11:34 +0100)
commitf4e874ca04acec37a37e46b9b6a228a463c0cf95
tree5af76b73fd0985f78e58849758179db105b8ad2d
parentdda10aabd4556a4121f89f8c3a9678fb21bdb1cd
Add row_factory as connection attribute and connect argument

When passing 'row_factory' to connect(), respective attribute will be
set on the connection instance. This will be used as default at cursor
creation and can be overridden with conn.cursor(row_factory=...) or
conn.execute(row_factory=...).

We use a '_null_row_factory' marker to handle None-value passed to
.cursor() or .execute() for disabling the default row factory.
psycopg3/psycopg3/connection.py
tests/test_connection.py
tests/test_connection_async.py