]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add type accessors for JSON indexed/pathed element access
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 7 Nov 2019 20:31:48 +0000 (15:31 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 11 Nov 2019 19:38:06 +0000 (14:38 -0500)
commitf26af5d6177ce4a426a94ac293d7a5dfccb1412d
treeb288c0a57228b1ed12d8477e3fc02b5c34dde441
parentcd49efa88f7fbe9313f220b5bca3582e71a04b10
Add type accessors for JSON indexed/pathed element access

Added new accessors to expressions of type :class:`.JSON` to allow for
specific datatype access and comparison, covering strings, integers,
numeric, boolean elements.   This revises the documented approach of
CASTing to string when comparing values, instead adding specific
functionality into the PostgreSQL, SQlite, MySQL dialects to reliably
deliver these basic types in all cases.

The change also delivers a new feature to the test exclusions
system so that combinations and exclusions can be used together.

Fixes: #4276
Change-Id: Ica5a926c060feb40a0a7cd60b9d6e061d7825728
(cherry picked from commit 01cbf4d7b8acab54a054bb36dc2792b518b5cd1f)
doc/build/changelog/unreleased_13/4276.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/json.py
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_types.py
test/dialect/postgresql/test_types.py
test/requirements.py
test/sql/test_operators.py