]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add compatibility properties to Range; implement pep-484
authorLele Gaifax <lele@metapensiero.it>
Mon, 5 Dec 2022 01:51:13 +0000 (20:51 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Dec 2022 16:51:26 +0000 (11:51 -0500)
commit3da784be647125f8727a92d1e386155e1f53c671
tree3ee33277558ec4dcd1b38288be33939dcc25c5b5
parent9058593e0b28cee0211251de6604e4601ff69a00
Add compatibility properties to Range; implement pep-484

This adds a bunch of properties to new PG Range class for compatibility
with other implementations, providing a more similar API to access
emptiness and bounds status.

The naming conventions here derive from PostgreSQL itself,
see https://www.postgresql.org/docs/9.3/functions-range.html .

pep-484 also implemented by Mike, as this is a pretty type-intensive
module.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes: #8927
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8927
Pull-request-sha: 8b9e7b7e3345673b43aeabd7ec88b88dc3cfa7eb

Change-Id: I0b1d49311517ee1cc1377a974ed0a860ea5756e4
lib/sqlalchemy/dialects/postgresql/ranges.py
test/dialect/postgresql/test_types.py