abhiabhi94
5a634a7b6f
Fixed #32906 -- Added docs and tests for using key and index lookups on JSONBAgg results.
...
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-26 11:23:51 +02:00
Nick Pope
fee8734596
Refs #10929 -- Deprecated forced empty result value for PostgreSQL aggregates.
...
This deprecates forcing a return value for ArrayAgg, JSONBAgg, and
StringAgg when there are no rows in the query. Now that we have a
``default`` argument for aggregates, we want to revert to returning the
default of ``None`` which most aggregate functions return and leave it
up to the user to decide what they want to be returned by default.
2021-07-19 13:41:16 +02:00
Nick Pope
501a8db465
Fixed #10929 -- Added default argument to aggregates.
...
Thanks to Simon Charette and Adam Johnson for the reviews.
2021-07-19 13:04:27 +02:00
Hannes Ljungberg
a06b977a91
Fixed #32776 -- Added support for Array subqueries on PostgreSQL.
2021-07-06 07:36:52 +02:00
Hannes Ljungberg
d8c90d4c22
Fixed #32786 -- Moved subquery ordering clearing optimization to the _in lookup.
...
Co-Authored-By: Simon Charette <charette.s@gmail.com>
2021-06-30 10:08:55 +02:00
Mariusz Felisiak
5371ad1d14
Refs #26430 -- Added tests for PostgreSQL-specific aggregates on EmptyQuerySets and used subTest().
2021-06-29 20:23:59 +02:00
Nick Pope
66af94d56e
Removed unnecessary json.loads() call in test_json_agg_empty().
2021-06-28 09:22:23 +02:00
Nick Pope
e8e8e207e7
Ensured that empty result test for JSONBAgg executes a query.
...
Use of QuerySet.none() will cause the EmptyQuerySet aggregation
optimisation to be used. Change the test to be implemented like the
other tests for empty results in this file.
2021-06-28 09:21:57 +02:00
Nick Pope
1aca9fc7d2
Corrected test method and variable names for JSONBAgg.
...
This is probably a hangover from when the aggregate function was
originally called JSONAgg during development.
2021-06-28 09:17:34 +02:00
Mariusz Felisiak
e07609a0d1
Refs #32858 , Refs #32392 -- Restored using :: shortcut syntax in Cast() on PostgreSQL.
...
This partly reverts commit fdfbc66331
unnecessary since b69b0c3fe8
.
2021-06-22 06:28:42 +02:00
Lucidiot
b69b0c3fe8
Fixed #32858 -- Fixed ExclusionConstraint crash with index transforms in expressions.
2021-06-22 06:09:16 +02:00
Sanskar Jaiswal
8c3bd0b708
Fixed #31653 -- Added AddConstraintNotValid()/ValidateConstraint() operations for PostgreSQL.
2021-06-08 07:46:51 +02:00
Mariusz Felisiak
f0a9413bd2
Refs #24121 -- Improved Value.__repr__().
2021-05-24 07:26:53 +02:00
Hannes Ljungberg
3aa545281e
Fixed #30916 -- Added support for functional unique constraints.
...
Thanks Ian Foote and Mariusz Felisiak for reviews.
2021-02-23 20:19:53 +01:00
Hannes Ljungberg
87acbf0631
Fixed #32458 -- Made __repr__() for Index and BaseConstraint subclasses more consistent.
2021-02-19 20:25:11 +01:00
Tilman Koschnick
fdfbc66331
Fixed #32392 -- Fixed ExclusionConstraint crash with Cast() in expressions.
2021-01-29 11:05:00 +01:00
Mariusz Felisiak
5371342ed6
Fixed #32357 -- Dropped support for PostgreSQL 9.6 and PostGIS 2.3.
2021-01-19 12:25:20 +01:00
Mariusz Felisiak
2dd6a83d2d
Refs #12990 -- Removed django.contrib.postgres.forms.JSONField per deprecation timeline.
2021-01-14 17:50:04 +01:00
Mariusz Felisiak
8fdb5a656a
Refs #12990 -- Removed django.contrib.postgres.fields.jsonb.KeyTransform/KeyTextTransform.
...
Per deprecation timeline.
2021-01-14 17:50:04 +01:00
Mariusz Felisiak
7cb5712edc
Refs #12990 -- Removed django.contrib.postgres.fields.JSONField per deprecation timeline.
2021-01-14 17:50:04 +01:00
Hannes Ljungberg
83fcfc9ec8
Fixed #26167 -- Added support for functional indexes.
...
Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews.
Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
2021-01-13 11:47:50 +01:00
Mariusz Felisiak
d746f28949
Refs #27095 -- Fixed test_contained_by_including_F_object when run in reverse.
...
Tests should not rely on auto PKs.
Test regression in 33403bf80f
.
2020-12-03 09:30:33 +01:00
Ian Foote
8b040e3cbb
Fixed #25534 , Fixed #31639 -- Added support for transform references in expressions.
...
Thanks Mariusz Felisiak and Simon Charette for reviews.
2020-11-27 20:42:04 +01:00
Hannes Ljungberg
33403bf80f
Refs #27095 -- Allowed (non-nested) arrays containing expressions for ArrayField lookups.
2020-11-26 10:57:58 +01:00
Hannes Ljungberg
755b327552
Added test for ArrayField's __contains lookup with subqueries.
2020-11-26 09:36:00 +01:00
Artur Beltsov
18c8ced81e
Fixed #32169 -- Added distinct support to JSONBAgg.
2020-11-04 21:22:54 +01:00
Tom Carrick
f5e07601b2
Fixed #32046 -- Added CreateCollation/RemoveCollation operations for PostgreSQL.
2020-10-21 10:53:44 +02:00
Mariusz Felisiak
ee0abac169
Refs #32096 -- Fixed ExclusionConstraint crash with JSONField key transforms in expressions.
...
Regression in 6789ded0a6
.
2020-10-14 20:56:04 +02:00
Mariusz Felisiak
1f31027bb3
Refs #32096 -- Fixed crash of ArrayAgg/StringAgg/JSONBAgg with ordering over JSONField key transforms.
...
Regression in 6789ded0a6
.
Thanks Igor Jerosimić for the report.
2020-10-14 20:56:04 +02:00
Mariusz Felisiak
1d650ad019
Refs #32096 -- Added test for ArrayAgg over JSONField key transforms.
2020-10-14 20:56:04 +02:00
Maxim Petrov
bf6d07730c
Fixed #31902 -- Fixed crash of ExclusionConstraint on expressions with params.
2020-08-19 06:43:54 +02:00
Mariusz Felisiak
88af11c58b
Refs #27996 -- Fixed postgres_tests crash if not running with PostgreSQL.
2020-07-31 12:38:09 +02:00
David Smith
e74b3d724e
Bumped minimum isort version to 5.1.0.
...
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.
2020-07-30 10:58:59 +02:00
Nick Pope
628c4a26ee
Refs #27996 -- Doc'd no extension required for RandomUUID() on PostgreSQL 13+.
...
https://www.postgresql.org/docs/13/functions-uuid.html
https://www.postgresql.org/docs/13/pgcrypto.html#id-1.11.7.34.10.5
2020-07-28 07:21:16 +02:00
David Chorpash
6ec5eb5d74
Refs #31720 -- Defined default output_field of BoolAnd() and BoolOr() aggregate functions.
2020-07-21 06:42:51 +02:00
Simon Charette
156a2138db
Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests.
2020-07-15 10:58:38 +02:00
Simon Charette
5227101787
Defined output_field of Func() in test_grouping_by_annotations_with_array_field_param().
...
output_field cannot be automatically determined because the first
argument passed to ARRAY_LEN is an ArrayField and the second one is an
integer.
2020-06-24 12:26:36 +02:00
Hannes Ljungberg
0d6d4e78b1
Fixed #31709 -- Added support for opclasses in ExclusionConstraint.
2020-06-16 08:16:14 +02:00
Hannes Ljungberg
7edc6e53a7
Fixed #31702 -- Added support for PostgreSQL opclasses in UniqueConstraint.
2020-06-16 07:19:00 +02:00
John Parton
a8473b4d34
Fixed #31691 -- Added ordering support to JSONBAgg.
2020-06-13 00:06:29 +02:00
Hannes Ljungberg
e0cdd0fcf5
Fixed #31649 -- Added support for covering exclusion constraints on PostgreSQL 12+.
2020-06-12 23:23:21 +02:00
Hannes Ljungberg
8c7992f658
Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+.
2020-06-04 12:26:22 +02:00
Adam Johnson
22a59c01c0
Refs #31615 -- Added EXISTS clauses to extension operations.
2020-06-03 07:02:48 +02:00
Adam Johnson
fa58450a9a
Fixed #31468 -- Allowed specifying migration filename in Operation.
...
This adds also suggested filename for many built-in operations.
2020-05-28 11:42:53 +02:00
Frantisek Holop
d693a086de
Fixed #31615 -- Made migrations skip extension operations if not needed.
...
- Don't try to create an existing extension.
- Don't try to drop a nonexistent extension.
2020-05-27 10:48:44 +02:00
Frantisek Holop
73216aaaa9
Used not installed extension in CreateExtension() tests.
...
uuid-ossp was already installed.
2020-05-27 10:46:22 +02:00
Hannes Ljungberg
952afc166c
Fixed #31601 -- Fixed SearchHeadlineTests on PostgresSQL 9.6.18+, 10.13+, 11.8+, and 12.3+.
2020-05-19 07:46:22 +02:00
Mariusz Felisiak
e536fa5ce1
Fixed #31579 -- Dropped support for PostgreSQL 9.5 and PostGIS 2.2.
2020-05-14 06:33:00 +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
Mariusz Felisiak
106e8dc91a
Completed test coverage for ExclusionConstraint.
...
Dropping exclusion constraints was untested.
2020-05-07 10:02:14 +02:00