Adam Johnson
26a67943ac
Removed outdated note about lack of subquery support in MySQL.
2024-08-28 15:55:30 -03:00
Mariusz Felisiak
2b9f0b79bc
Fixed typo in docs/ref/models/expressions.txt.
2024-08-28 09:08:16 -03:00
Mariusz Felisiak
fed11ba461
Fixed typo in docs/ref/models/expressions.txt.
2024-08-28 09:08:16 -03:00
Clifford Gama
ca1318988c
Fixed #35671 -- Clarified string-based fields behavior when null=False.
2024-08-20 08:09:39 +02:00
Devin Cox
e03083917d
Fixed #35586 -- Added support for set-returning database functions.
...
Aggregation optimization didn't account for not referenced set-returning annotations on Postgres.
Co-authored-by: Simon Charette <charette.s@gmail.com>
2024-08-12 15:35:19 +02:00
Mariusz Felisiak
304d256674
Used :pypi: role in docs where appropriate.
2024-08-05 10:35:50 -03:00
Simon Charette
65ad4ade74
Refs #28900 -- Made SELECT respect the order specified by values(*selected).
...
Previously the order was always extra_fields + model_fields + annotations with
respective local ordering inferred from the insertion order of *selected.
This commits introduces a new `Query.selected` propery that keeps tracks of the
global select order as specified by on values assignment. This is crucial
feature to allow the combination of queries mixing annotations and table
references.
It also allows the removal of the re-ordering shenanigans perform by
ValuesListIterable in order to re-map the tuples returned from the database
backend to the order specified by values_list() as they'll be in the right
order at query compilation time.
Refs #28553 as the initially reported issue that was only partially fixed
for annotations by d6b6e5d0fd
.
Thanks Mariusz Felisiak and Sarah Boyce for review.
2024-07-03 16:36:25 +02:00
Mariusz Felisiak
0f694ce2eb
Made cosmetic edits to code snippets reformatted with blacken-docs.
2024-05-30 09:42:05 -03:00
Adam Zapletal
99273fd525
Fixed #24076 -- Added warnings on usage of dates with DateTimeField and datetimes with DateField.
2024-05-23 12:03:57 +02:00
Natalia
05cce083ad
Removed versionadded/changed annotations for 5.0.
...
This also removes remaining versionadded/changed annotations for older
versions.
2024-05-22 15:44:07 -03:00
Mariusz Felisiak
f030236a86
Fixed #35275 -- Fixed Meta.constraints validation crash on UniqueConstraint with OpClass().
...
This also introduces Expression.constraint_validation_compatible that
allows specifying that expression should be ignored during a constraint
validation.
2024-05-14 10:34:30 +02:00
John Parton
914bf69171
Clarified when ImageField attributes are set.
2024-05-02 10:04:55 +02:00
Mariusz Felisiak
160c0ab13a
Fixed rendering XOR section in docs.
2024-05-02 09:26:44 +02:00
Mohammad Kazemi
47c608202a
Extended docs for Q() objects mentioning the ~ (NOT) operator.
...
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-04-15 13:16:35 -03:00
Adam Zapletal
fd2514d17d
Added RowNumber() link in Rank() docs.
2024-03-21 05:52:07 +01:00
Mariusz Felisiak
9c17010358
Refs #34059 , Refs #34060 -- Removed outdated warning about validation of JSONField constraints.
...
Known issues have been fixed in:
- 0d8fbe2ade
,
- c991602ce5
, and
- 26aae56144
.
2024-03-18 16:11:38 +01:00
Mariusz Felisiak
36a000858b
Refs #33996 -- Updated CheckConstraint validation on NULL values on Oracle 23c+.
...
Oracle 23c supports comparing boolean expressions.
2024-03-15 12:34:54 +01:00
Simon Charette
daf7d482db
Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition.
...
Once the deprecation period ends CheckConstraint.check() can become the
documented method that performs system checks for BaseConstraint
subclasses.
2024-03-01 07:15:32 +01:00
David Sanders
7714ccfeae
Refs #34964 -- Doc'd that Q expression order is preserved.
2024-02-28 11:41:06 +01:00
Adam Johnson
7ba6c9edc5
Fixed #28011 -- Corrected Field.hidden docs.
2024-02-17 17:17:23 +01:00
jordanbae
4fec1d2ce3
Fixed #34949 -- Clarified when UniqueConstraints with include/nulls_distinct are not created.
2024-01-15 13:42:02 +01:00
Aivars Kalvans
f92641a636
Fixed #28344 -- Allowed customizing queryset in Model.refresh_from_db()/arefresh_from_db().
...
The from_queryset parameter can be used to:
- use a custom Manager
- lock the row until the end of transaction
- select additional related objects
2024-01-15 10:55:14 +01:00
Salvo Polizzi
3915d4c70d
Fixed #35060 -- Deprecated passing positional arguments to Model.save()/asave().
2024-01-02 08:42:33 +01:00
Nick Pope
94b6f101f7
Fixed #29049 -- Added slicing notation to F expressions.
...
Co-authored-by: Priyansh Saxena <askpriyansh@gmail.com>
Co-authored-by: Niclas Olofsson <n@niclasolofsson.se>
Co-authored-by: David Smith <smithdc@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Abhinav Yadav <abhinav.sny.2002@gmail.com>
2023-12-30 08:24:30 +01:00
Mariusz Felisiak
0be6dde817
Corrected code-block directives in docs.
2023-12-28 19:52:15 +01:00
Viicos
e28bd6776d
Added missing import in docs/ref/models/expressions.txt.
2023-12-15 11:17:06 +01:00
KimSia Sim
c9ce764f59
Updated conditions to retrieve primary keys in bulk_create() docs.
2023-11-29 11:57:53 +01:00
Aman Pandey
0fcd72bc48
Fixed #34633 -- Made create() method of reverse many-to-one managers clear prefetch_related() cache.
2023-11-28 05:46:04 +01:00
Mariusz Felisiak
5875f03ce6
Fixed #34944 -- Made GeneratedField.output_field required.
...
Regression in f333e3513e
.
2023-11-14 20:22:07 +01:00
Jacob Walls
427f0ed98d
Fixed typos in docs/ref/models/fields.txt.
2023-11-09 09:58:06 +03:00
Sarah Boyce
e4d012ca05
Refs #29850 -- Added exclusion support to window frames.
2023-10-30 12:04:55 +01:00
Sarah Boyce
6375cee490
Refs #29850 -- Added RowRange support for positive integer start and negative integer end.
2023-10-28 15:16:07 +02:00
Sarah Boyce
8992a0489c
Fixed typos in docs/ref/models/expressions.txt.
2023-10-28 14:21:15 +02:00
Mariusz Felisiak
718b32c691
Added missing pycon directives in various docs.
2023-10-25 12:27:27 +02:00
Tim Bell
ee104251c4
Fixed #27403 -- Doc'd that QuerySet.prefetch_related() doesn't guarantee transactional consistency.
...
Added a note about the potential race condition in prefetch_related()
that could produce an inconsistent result, one that does not correspond
to any point in the database history.
2023-10-25 09:49:33 +02:00
lufafajoshua
8adc7c86ab
Fixed #34808 -- Doc'd aggregate function's default argument.
2023-10-11 15:17:36 -03:00
David Sanders
e47298aec4
Refs #31435 -- Doc'd potential infinite recursion when accessing model fields in __init__.
2023-10-05 14:19:43 -03:00
Mariusz Felisiak
91cb2d0b48
Refs #22936 -- Doc'd Lookup.prepare_rhs.
2023-10-05 15:26:02 +02:00
Mariusz Felisiak
f9e9526800
Fixed #34873 -- Added QuerySet.explain() support for GENERIC_PLAN option on PostgreSQL 16+.
2023-09-26 12:05:26 +02:00
David Sanders
78b5c90753
Refs #34808 -- Doc'd that aggregation functions on empty groups can return None.
2023-09-21 12:14:15 -03:00
Mariusz Felisiak
3623a0c079
Fixed #34850 -- Dropped support for MariaDB 10.4.
2023-09-19 15:06:05 +02:00
Mariusz Felisiak
2abf417c81
Refs #27236 -- Removed Meta.index_together per deprecation timeline.
2023-09-18 22:12:40 +02:00
Mariusz Felisiak
295467c04a
Removed versionadded/changed annotations for 4.2.
...
This also removes remaining versionadded/changed annotations for older
versions.
2023-09-18 22:12:40 +02:00
Clément Escolano
cac94dd8aa
Fixed #33651 -- Added support for prefetching GenericForeignKey.
...
Co-authored-by: revanthgss <revanthgss@almabase.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-09-18 13:23:21 +02:00
Mariusz Felisiak
88b5b7b8e5
Corrected QuerySet.prefetch_related() note about GenericRelation().
...
GenericRelation is a reverse generic relationship so it's always
homogeneous. Mentioning this as a restriction is confusing.
2023-09-16 06:57:38 +02:00
Natalia
691f70c477
Fixed #24561 -- Added support for callables on model fields' choices.
2023-09-14 10:15:33 -03:00
Jeremy Nauta
f333e3513e
Fixed #31300 -- Added GeneratedField model field.
...
Thanks Adam Johnson and Paolo Melchiorre for reviews.
Co-Authored-By: Lily Foote <code@lilyf.org>
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-09-07 06:19:08 +02:00
Nick Pope
500e01073a
Fixed #31262 -- Added support for mappings on model fields and ChoiceField's choices.
2023-08-30 22:57:40 -03:00
Mariusz Felisiak
9c37103a98
Refs #33507 -- Doc'd using UUID data type on MariaDB 10.7+ in UUIDField docs.
...
Follow up to 7cd187a5ba
.
2023-08-25 11:24:21 +02:00
Mariusz Felisiak
2b582387d5
Fixed #34760 -- Dropped support for SQLite < 3.27.
2023-08-04 06:35:13 +02:00