11 Commits

Author SHA1 Message Date
Hannes Ljungberg
cc3870c30f [3.1.x] Fixed #32182 -- Fixed crash of JSONField nested key transforms with subquery annotations on PostgreSQL.
Backport of 0773837e15bb632afffb6848a58c59a791008fa1 from master
2020-11-10 08:13:03 +01:00
Mariusz Felisiak
ae6b24093c [3.1.x] Refs #32096 -- Fixed ExpressionWrapper crash with JSONField key transforms.
Regression in 6789ded0a6ab797f0dcdfa6ad5d1cfa46e23abcd.

Thanks Simon Charette and Igor Jerosimić for the report.

Backport of bbd55e58639c33b4c5adff5f41b78deffc915c11 from master
2020-10-14 21:03:40 +02:00
Mariusz Felisiak
59fe0b8541 [3.1.x] Refs #32096 -- Fixed __in lookup crash against key transforms for JSONField.
Regression in 6789ded0a6ab797f0dcdfa6ad5d1cfa46e23abcd and
1251772cb83aa4106f526fe00738e51c0eb59122.

Thanks Simon Charette and Igor Jerosimić for the report.

Backport of 7e1e198494d4fc72cf6e153f9d24fe2493c17dc1 from master
2020-10-14 21:03:15 +02:00
Mariusz Felisiak
655e1ce6b1 [3.1.x] Fixed #31956 -- Fixed crash of ordering by JSONField with a custom decoder on PostgreSQL.
Thanks Marc Debureaux for the report.
Thanks Simon Charette, Nick Pope, and Adam Johnson for reviews.

Backport of 0be51d2226fce030ac9ca840535a524f41e9832c from master
2020-08-28 19:12:02 +02:00
Mariusz Felisiak
9075d1f662 [3.1.x] Fixed #31936 -- Fixed __in lookup on key transforms for JSONField.
This resolves an issue on databases without a native JSONField
(MariaDB, MySQL, SQLite, Oracle), where values must be wrapped.

Thanks Sébastien Pattyn for the report.
Backport of 1251772cb83aa4106f526fe00738e51c0eb59122 from master
2020-08-26 22:14:46 +02:00
Tim Graham
32cb1fe1c6 [3.1.x] Refs #31829 -- Added DatabaseFeatures.json_key_contains_list_matching_requires_list.
CockroachDB's behavior matches PostgreSQL.
Backport of 184a6eebb0ef56d5f1b1315a8e666830e37f3f81 from master
2020-07-30 06:40:32 +02:00
sage
23ce3d8491 [3.1.x] Fixed #31829 -- Used JSONField __contains lookup on key transforms.
Backport of 2d8dcba03aae200aaa103ec1e69f0a0038ec2f85 from master
2020-07-28 20:53:11 +02:00
Mariusz Felisiak
247bcef6b4 [3.1.x] Fixed #31836 -- Dropped support for JSONField __contains and __contained_by lookups on SQLite.
The current implementation works only for basic examples without
supporting nested structures and doesn't follow "the general principle
that the contained object must match the containing object as to
structure and data contents, possibly after discarding some
non-matching array elements or object key/value pairs from the
containing object".

Backport of ba691933cee375195c9c50f333dd4b2a3abbb726 from master.
2020-07-28 13:08:19 +02:00
Mariusz Felisiak
028a5f86f2 [3.1.x] Fixed #31835 -- Dropped support for JSONField __contains lookup on Oracle.
The current implementation works only for basic examples without
supporting nested structures and doesn't follow "the general principle
that the contained object must match the containing object as to
structure and data contents, possibly after discarding some
non-matching array elements or object key/value pairs from the
containing object".
Backport of 02447fb133b53ec7d0ff068cc08f06fdf8817ef7 from master
2020-07-28 11:54:35 +02:00
Tim Graham
5480fab290 [3.1.x] Refs #12990 -- Added DatabaseFeatures.has_json_operators.
CockroachDB also has them.
Backport of f59a2b730685fc62c5cb44101f54faf8921d9bc7 from master
2020-05-18 08:12:57 +02:00
sage
6789ded0a6 Fixed #12990, Refs #27694 -- Added JSONField model field.
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael
Michel for mentoring this Google Summer of Code 2019 project and
everyone else who helped with the patch.

Special thanks to Mads Jensen, Nick Pope, and Simon Charette for
extensive reviews.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-05-08 07:23:31 +02:00