summaryrefslogtreecommitdiff
path: root/django/db/models/functions/comparison.py
AgeCommit message (Collapse)Author
2026-03-16Fixed #36906 -- Handled coalescing JSON-primitive strings and JSON values on ↵Kanin Kearpimy
Oracle.
2025-08-04Fixed #35972 -- Fixed lookup crashes after subquery annotations.Jacob Walls
2024-12-16Refs #35718, Refs #32179 -- Moved JSONObject to django.db.models.functions.json.Sage Abdullah
2024-11-06Fixed #35778 -- Used JSON_OBJECT database function on PostgreSQL 16+ with ↵John Parton
server-side bindings.
2024-11-06Removed definition of JSONObject ArgJoiner class in as_native function.Sarah Boyce
2024-09-26Fixed #35734 -- Used JSONB_BUILD_OBJECT database function on PostgreSQL when ↵John Parton
using server-side bindings. Regression in 81ccf92f154c6d9eac3e30bac0aa67574d0ace15.
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2023-12-31Used JSON_OBJECT database function on PostgreSQL 16+.Nick Pope
2023-08-02Removed unneeded escapes in regexes.Mariusz Felisiak
Special characters lose their special meaning inside sets of characters. "-" lose its special meaning if it's placed as the first or last character. Follow up to 7c6b66383da5f9a67142334cd2ed2d769739e8f1.
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.
2022-12-15Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-09-29Fixed #33141 -- Renamed Expression.empty_aggregate_value to ↵David Wobrock
empty_result_set_value.
2021-07-02Refs #26430 -- Re-introduced empty aggregation optimization.Simon Charette
The introduction of the Expression.empty_aggregate_value interface allows the compilation stage to enable the EmptyResultSet optimization if all the aggregates expressions implement it. This also removes unnecessary RegrCount/Count.convert_value() methods. Disabling the empty result set aggregation optimization when it wasn't appropriate prevented None returned for a Count aggregation value. Thanks Nick Pope for the review.
2021-06-22Refs #32858, Refs #32392 -- Restored using :: shortcut syntax in Cast() on ↵Mariusz Felisiak
PostgreSQL. This partly reverts commit fdfbc66331292def201c9344e3cd29fbcbcd076a unnecessary since b69b0c3fe871167a0ca01bb439508e335143801f.
2021-01-29Fixed #32392 -- Fixed ExclusionConstraint crash with Cast() in expressions.Tilman Koschnick
2020-12-02Fixed #32179 -- Added JSONObject database function.Artur Beltsov
2020-08-11Fixed #21181 -- Added Collate database function.Tom Carrick
Thanks Simon Charette for reviews.
2020-05-08Fixed #12990, Refs #27694 -- Added JSONField model field.sage
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>
2019-01-14Simplified overriding source expressions in some database functions.Nick Pope
2019-01-10Refs #28643 -- Added NullIf database function.Mads Jensen
Thanks Nick Pope, Mariusz Felisiak, and Tim Graham for reviews.
2019-01-08Simplified some imports for database functions.Nick Pope
Used more specific modules to reduce the risk of circular imports.
2018-10-01Fixed #29767 -- Made date-related casts work on SQLiteClaude Paroz
Thanks Rémy Hubscher for the report and Tim Graham and Simon Charette for the reviews.
2018-08-23Fixed #29048 -- Added **extra_context to database function as_vendor() methods.priyanshsaxena
2018-01-17Fixed #28857 -- Fixed invalid SQL when using Cast with complex expressions ↵hayashi
on PostgreSQL.
2017-12-27Fixed #28967 -- Prevented Cast to FloatField from rounding to integer on MySQL.Sergey Fedoseev
2017-10-13Refs #28643 -- Reorganized database functions.Mariusz Felisiak
Thanks Tim Graham for the review.