summaryrefslogtreecommitdiff
path: root/docs/ref/models/expressions.txt
AgeCommit message (Collapse)Author
2026-01-29Fixed docs spelling errors accumulated over time.Natalia
The `docs` GitHub action does not install `aspell` so the seplling checks are always passing in CI. After installing it, the following errors are reported: WARNING: internals/security.txt:50: : Spell check: runnable: Include a runnable proof of concept. WARNING: ref/contrib/postgres/search.txt:292: : Spell check: lexeme: an untrusted source. The content of each lexeme is escaped so that any. WARNING: ref/contrib/postgres/search.txt:295: : Spell check: lexemes: You can combine lexemes with other lexemes using the . WARNING: ref/contrib/postgres/search.txt:295: : Spell check: lexemes: You can combine lexemes with other lexemes using the . WARNING: ref/contrib/postgres/search.txt:314: : Spell check: Lexeme: Lexeme objects also support term weighting and prefixes:. WARNING: ref/models/database-functions.txt:1897: : Spell check: ai: 23ai/26ai (23.9) or later.. WARNING: ref/models/database-functions.txt:1897: : Spell check: ai: 23ai/26ai (23.9) or later.. WARNING: ref/models/expressions.txt:439: : Spell check: positionally: can be supplied positionally or only by keyword. For. WARNING: ref/models/fields.txt:1339: : Spell check: ai: PostgreSQL < 18 only supports persisted columns. Oracle < 23ai/26ai (23.7). WARNING: ref/models/fields.txt:1339: : Spell check: ai: PostgreSQL < 18 only supports persisted columns. Oracle < 23ai/26ai (23.7). WARNING: ref/models/fields.txt:1344: : Spell check: ai: s was added on Oracle 23ai/26ai. WARNING: ref/models/fields.txt:1344: : Spell check: ai: s was added on Oracle 23ai/26ai. WARNING: releases/4.2.21.txt:24: : Spell check: unclosed: exception if it encounters an unusually large number of unclosed opening tags.. WARNING: releases/5.1.9.txt:24: : Spell check: unclosed: exception if it encounters an unusually large number of unclosed opening tags.. WARNING: releases/5.2.1.txt:24: : Spell check: unclosed: exception if it encounters an unusually large number of unclosed opening tags.. WARNING: releases/6.1.txt:244: : Spell check: mistyped: suggestions for mistyped subcommand names and argument choices.. WARNING: releases/6.1.txt:281: : Spell check: ai: Oracle 23ai/26ai (23.7+).. WARNING: releases/6.1.txt:281: : Spell check: ai: Oracle 23ai/26ai (23.7+).. WARNING: releases/6.1.txt:343: : Spell check: durations: durations expressed in weeks (. WARNING: Found 19 misspelled words build finished with problems, 20 warnings (with warnings treated as errors). This branch adds some of the words to the allowlist, but for others I chose to rephrase the text in a more approachable manner.
2025-12-08Fixed #36778 -- Extended advice to sanitize input before using in query ↵Jacob Walls
expressions. Thanks Clifford Gama and Simon Charette for reviews.
2025-11-26Fixed #31506 -- Clarified that ExpressionWrapper does not perform database ↵Cha Hwa Young
casts. Added warning in DateField documentation about type differences when using timedelta on PostgreSQL and MySQL. Mentioned Cast() and integer arithmetic solutions.
2025-10-29Fixed #35381 -- Added JSONNull() expression.Clifford Gama
Thanks Jacob Walls for the review.
2025-10-29Fixed #36329 -- Removed non-code custom link text when cross-referencing ↵Clifford Gama
Python objects. Thanks Bruno Alla, Sarah Boyce, and Jacob Walls for reviews. Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2025-10-17Fixed #36669 -- Doc'd that negative indexes are not supported in F() slices.aj2s
2025-09-17Removed versionadded/changed annotations for 5.2.Jacob Walls
2025-09-14Fixed #27222 -- Refreshed model field values assigned expressions on save().Simon Charette
Removed the can_return_columns_from_insert skip gates on existing field_defaults tests to confirm the expected number of queries are performed and that returning field overrides are respected.
2025-08-31Removed unused import in docs/ref/models/expressions.txt example.Clifford Gama
2025-08-28Ensured :doc: role uses absolute targets in docs.Adam Johnson
2025-08-28Fixed #36570 -- Removed unnecessary :py domain from documentation roles.SaJH
Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-25Refs #36485 -- Rewrapped docs to 79 columns line length.David Smith
Lines in the docs files were manually adjusted to conform to the 79 columns limit per line (plus newline), improving readability and consistency across the content.
2025-08-25Refs #36485 -- Removed unnecessary parentheses in :meth: and :func: roles in ↵David Smith
docs.
2025-08-04Fixed #35972 -- Fixed lookup crashes after subquery annotations.Jacob Walls
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2025-03-13Fixed incorrect formatting for inline pluralized code references in docs.Clifford Gama
2025-03-03Fixed #35444 -- Added generic support for Aggregate.order_by.Chris Muthig
This moves the behaviors of `order_by` used in Postgres aggregates into the `Aggregate` class. This allows for creating aggregate functions that support this behavior across all database engines. This is shown by moving the `StringAgg` class into the shared `aggregates` module and adding support for all databases. The Postgres `StringAgg` class is now a thin wrapper on the new shared `StringAgg` class. Thank you Simon Charette for the review.
2025-01-15Removed versionadded/changed annotations for 5.1.Sarah Boyce
This also removes remaining versionadded/changed annotations for older versions.
2025-01-14Fixed #36051 -- Declared arity on aggregate functions.Jacob Walls
Follow-up to 4a66a69239c493c05b322815b18c605cd4c96e7c.
2025-01-07Refs #36042 -- Raised ValueError when providing composite expressions to ↵Jacob Walls
aggregates.
2024-08-28Fixed typo in docs/ref/models/expressions.txt.Mariusz Felisiak
2024-08-28Fixed typo in docs/ref/models/expressions.txt.Mariusz Felisiak
2024-08-12Fixed #35586 -- Added support for set-returning database functions.Devin Cox
Aggregation optimization didn't account for not referenced set-returning annotations on Postgres. Co-authored-by: Simon Charette <charette.s@gmail.com>
2024-05-22Removed versionadded/changed annotations for 5.0.Natalia
This also removes remaining versionadded/changed annotations for older versions.
2024-05-14Fixed #35275 -- Fixed Meta.constraints validation crash on UniqueConstraint ↵Mariusz Felisiak
with OpClass(). This also introduces Expression.constraint_validation_compatible that allows specifying that expression should be ignored during a constraint validation.
2023-12-30Fixed #29049 -- Added slicing notation to F expressions.Nick Pope
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-28Corrected code-block directives in docs.Mariusz Felisiak
2023-12-15Added missing import in docs/ref/models/expressions.txt.Viicos
2023-10-30Refs #29850 -- Added exclusion support to window frames.Sarah Boyce
2023-10-28Refs #29850 -- Added RowRange support for positive integer start and ↵Sarah Boyce
negative integer end.
2023-10-28Fixed typos in docs/ref/models/expressions.txt.Sarah Boyce
2023-09-18Removed versionadded/changed annotations for 4.2.Mariusz Felisiak
This also removes remaining versionadded/changed annotations for older versions.
2023-08-03Fixed #34761 -- Dropped support for MySQL < 8.0.11.Mariusz Felisiak
2023-08-01Corrected pycon formatting in some docs.Almaz Kunpeissov
2023-06-27Added dedicated section for output_field in query expressions docs.nessita
2023-05-12Fixed #470 -- Added support for database defaults on fields.Ian Foote
Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews.
2023-03-01Fixed #34140 -- Reformatted code blocks in docs with blacken-docs.django-bot
2023-02-28Refs #34140 -- Corrected rst code-block and various formatting issues in docs.Joseph Victor Zammit
2023-02-10Refs #34140 -- Applied rst code-block to non-Python examples.Carlton Gibson
Thanks to J.V. Zammit, Paolo Melchiorre, and Mariusz Felisiak for reviews.
2023-01-17Refs #33543 -- Made Expression.asc()/desc() and OrderBy raise ValueError ↵Mariusz Felisiak
when nulls_first/nulls_last=False is passed. Per deprecation timeline.
2023-01-17Removed versionadded/changed annotations for 4.1.Mariusz Felisiak
2022-10-31Fixed #16211 -- Added logical NOT support to F expressions.David Wobrock
2022-10-06Refs #30158 -- Removed alias argument for Expression.get_group_by_cols().Simon Charette
Recent refactors allowed GROUP BY aliasing allowed for aliasing to be entirely handled by the sql.Query.set_group_by and compiler layers.
2022-08-15Refs #28333 -- Added partial support for filtering against window functions.Simon Charette
Adds support for joint predicates against window annotations through subquery wrapping while maintaining errors for disjointed filter attempts. The "qualify" wording was used to refer to predicates against window annotations as it's the name of a specialized Snowflake extension to SQL that is to window functions what HAVING is to aggregates. While not complete the implementation should cover most of the common use cases for filtering against window functions without requiring the complex subquery pushdown and predicate re-aliasing machinery to deal with disjointed predicates against columns, aggregates, and window functions. A complete disjointed filtering implementation should likely be deferred until proper QUALIFY support lands or the ORM gains a proper subquery pushdown interface.
2022-05-31Fixed docs build with sphinxcontrib-spelling 7.5.0+.Mariusz Felisiak
sphinxcontrib-spelling 7.5.0+ includes captions of figures in the set of nodes for which the text is checked.
2022-05-17Removed versionadded/changed annotations for 4.0.Carlton Gibson
2022-05-12Fixed #33543 -- Deprecated passing nulls_first/nulls_last=False to OrderBy ↵Mariusz Felisiak
and Expression.asc()/desc(). Thanks Allen Jonathan David for the initial patch.
2022-04-28Removed hyphen from pre-/re- prefixes.David
"prepopulate", "preload", and "preprocessing" are already in the spelling_wordlist. This also removes hyphen from double "e" combinations with "pre" and "re", e.g. preexisting, preempt, reestablish, or reenter. See also: - https://ahdictionary.com/word/search.html?q=rerun - https://ahdictionary.com/word/search.html?q=recreate - https://ahdictionary.com/word/search.html?q=predetermined - https://ahdictionary.com/word/search.html?q=reuse - https://ahdictionary.com/word/search.html?q=reopening
2022-02-22Removed redundant QuerySet.all() calls in docs and tests.Nick Pope
Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager.
2021-12-31Fixed #33391 -- Clarified Aggregate.empty_result_set_value docs.Mariusz Felisiak