summaryrefslogtreecommitdiff
path: root/django/db/backends/oracle/features.py
AgeCommit message (Collapse)Author
2026-04-18Fixed #37028 -- Added BitAnd(), BitOr(), and BitXor() aggregates.Mariusz Felisiak
2026-02-20Refs #36938 -- Marked a test for union of ordered querysets as an expected ↵Jacob Walls
failure on Oracle. Oracle's SQL parser does not allow ORDER BY in components of a union in some cases, so xfail this test until an exception can be raised.
2025-12-13Fixed #36765 -- Added support for stored GeneratedFields on Oracle 23ai/26ai ↵Mariusz Felisiak
(23.7+). Thanks Jacob Walls for the review.
2025-12-12Fixed #36735 -- Added UUID4 and UUID7 database functions.Lily Acorn
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-11-21Fixed #36718 -- Added JSONField support for negative array indexing on ↵Clifford Gama
Oracle 21c+.
2025-11-17Fixed #24920 -- Added support for DecimalField with no precision.Mariusz Felisiak
Thanks Lily for the review.
2025-10-18Fixed #21961 -- Added support for database-level delete options for ForeignKey.Mariusz Felisiak
Thanks Simon Charette for pair programming. Co-authored-by: Nick Stefan <NickStefan12@gmail.com> Co-authored-by: Akash Kumar Sen <71623442+Akash-Kumar-Sen@users.noreply.github.com> Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-09-14Refs #27222 -- Refreshed GeneratedFields values on save() initiated update.Simon Charette
This required implementing UPDATE RETURNING machinery that heavily borrows from the INSERT one.
2025-08-07Fixed #36210, Refs #36181 -- Allowed Subquery usage in further lookups ↵Jacob Walls
against composite pks. Follow-up to 8561100425876bde3be4b2a22324655f74ff9609. Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-05-20Fixed #34262 -- Added support for AnyValue for SQLite, MySQL, Oracle, and ↵ontowhee
Postgresql 16+. Thanks Simon Charette for the guidance and review. Thanks Tim Schilling for the documentation review. Thanks David Wobrock for investigation and solution proposals.
2025-05-14Fixed #36085 -- Added JSONField support for negative array indexing on SQLite.savanto
2025-04-30Refs #36052, #32234 -- Removed create_test_table_with_composite_primary_key ↵Simon Charette
flag in favor of using CompositePrimaryKey. Now that Django properly supports creating models with composite primary keys, the tests should use a `CompositePrimaryKey` field instead of a feature flag to inline backend specific SQL for creating a composite PK. Specifcially, the inspectdb's test_composite_primary_key was adjusted to use schema editor instead of per-backend raw SQL.
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-02-09Fixed #36148 -- Enabled native tuple comparison lookups on SQLite 3.37+ and ↵Simon Charette
Oracle 23.4+. VALUES must be explicitly specified when declaring a sequence of tuples on SQLite < 3.37 but it's not required on >= 3.37. See sqlite/sqlite@9289f51 which addressed the last remaining issue with IN.
2025-02-09Refs #36148 -- Relied on a feature switch to define tuple lookups support.Simon Charette
This should allow backends more easily opt-in or out of native support and rely on the fallback if unavailable.
2025-01-15Refs #33817 -- Removed support for cx_Oracle per deprecation timeline.Sarah Boyce
2024-12-17Fixed #7732 -- Added support for connection pools on Oracle.suraj
2024-08-13Fixed #35665 -- Fixed a crash when passing an empty order_by to Window.Simon Charette
This also caused un-ordered sliced prefetches to crash as they rely on Window. Regression in e16d0c176e9b89628cdec5e58c418378c4a2436a that made OrderByList piggy-back ExpressionList without porting the empty handling that the latter provided. Supporting explicit empty ordering on Window functions and slicing is arguably a foot-gun design due to how backends will return undeterministic results but this is a problem that requires a larger discussion. Refs #35064. Thanks Andrew Backer for the report and Mariusz for the review.
2024-08-03Fixed #35655 -- Reverted "Fixed #35295 -- Used INSERT with multiple rows on ↵Sarah Boyce
Oracle 23c." This reverts commit 175b04942afaff978013db61495f3b39ea12989b due to a crash when Oracle > 23.3.
2024-04-15Fixed ↵Mariusz Felisiak
backends.oracle.tests.TransactionalTests.test_hidden_no_data_found_exception() on oracledb >= 2.1.2. python-oracledb 2.1.2+ no longer hides 'ORA-1403: no data found' exceptions raised in database triggers: https://github.com/oracle/python-oracledb/issues/321
2024-03-16Stopped skipping ↵Mariusz Felisiak
model_fields.test_jsonfield.TestQuerying.test_usage_in_subquery on Oracle 23c.
2024-03-15Refs #33996 -- Updated CheckConstraint validation on NULL values on Oracle 23c+.Mariusz Felisiak
Oracle 23c supports comparing boolean expressions.
2024-03-14Fixed #35295 -- Used INSERT with multiple rows on Oracle 23c.Mariusz Felisiak
2024-01-23Refs #33517 -- Prevented __second lookup from returning fractional seconds ↵Hisham Mahmood
on Oracle.
2024-01-01Updated DatabaseFeatures.bare_select_suffix on Oracle 23c.Nick Pope
https://docs.oracle.com/en/database/oracle/oracle-database/23/nfcoa/application-development.html#GUID-4EB70EB9-4EE3-4FE2-99C4-86F7AAC60F12
2024-01-01Supported native aggregation over INTERVALs on Oracle 23c.Nick Pope
https://docs.oracle.com/en/database/oracle/oracle-database/23/nfcoa/application-development.html#GUID-CE5F8EED-934D-458D-B81C-6C8D617F31A2
2024-01-01Added note about SELECT index in GROUP BY on Oracle 23c.Nick Pope
As this isn't enabled by default and would be unsafe to enforce, just add a comment to note that this has to stay disabled. https://docs.oracle.com/en/database/oracle/oracle-database/23/nfcoa/application-development.html#GUID-EDDF041F-C10D-4334-838A-706227D7BFE0
2023-12-12Fixed #35018 -- Fixed migrations crash on GeneratedField with BooleanField ↵Mariusz Felisiak
as output_field on Oracle < 23c. Thanks Václav Řehák for the report. Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.
2023-11-03Fixed #34941 -- Fixed fetching decimal db_defaults for DecimalFields on Oracle.Mariusz Felisiak
This is a long standing bug in bc91f27a86090b4c688b56cd4e37f95eebe6e969 that began manifesting in 7414704e88d73dafbcfbb85f9bc54cb6111439d3.
2023-11-03Refs #34941 -- Skipped ↵Mariusz Felisiak
OperationTests.test_alter_field_change_nullable_to_decimal_database_default_not_null on Oracle.
2023-11-02Fixed #34936 -- Fixed migration crash for DecimalField with db_default on ↵David Sanders
SQLite. CAST() must be wrapped in parentheses to be recognized as an expression on SQLite. Regression in 7414704e88d73dafbcfbb85f9bc54cb6111439d3.
2023-11-02Refs #31300 -- Allowed testing GeneratedField without collation.Tim Graham
CockroachDB and Snowflake don't support it.
2023-10-30Refs #29850 -- Added exclusion support to window frames.Sarah Boyce
2023-09-07Fixed #31300 -- Added GeneratedField model field.Jeremy Nauta
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-08-10Fixed #33817 -- Added support for python-oracledb and deprecated cx_Oracle.Jingbei Li
2023-08-10Fixed DatabaseFeatures.supports_primitives_in_json_field on Oracle 21c+.Mariusz Felisiak
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-04-18Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock
relation on PostgreSQL.
2023-01-09Fixed #34176 -- Fixed grouping by ambiguous aliases.Simon Charette
Regression in b7b28c7c189615543218e81319473888bc46d831. Refs #31377. Thanks Shai Berger for the report and reviews. test_aggregation_subquery_annotation_values_collision() has been updated as queries that are explicitly grouped by a subquery should always be grouped by it and not its outer columns even if its alias collides with referenced table columns. This was not possible to accomplish at the time 10866a10 landed because we didn't have compiler level handling of colliding aliases.
2022-12-28Fixed #18468 -- Added support for comments on columns and tables.kimsoungryoul
Thanks Jared Chung, Tom Carrick, David Smith, Nick Pope, and Mariusz Felisiak for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-10-06Refs #33308 -- Enabled explicit GROUP BY and ORDER BY aliases.Simon Charette
This ensures explicit grouping from using values() before annotating an aggregate function groups by selected aliases if supported. The GROUP BY feature is disabled on Oracle because it doesn't support it.
2022-10-05Fixed #33768 -- Fixed ordering compound queries by nulls_first/nulls_last on ↵Simon Charette
MySQL. Columns of the left outer most select statement in a combined query can be referenced by alias just like by index. This removes combined query ordering by column index and avoids an unnecessary usage of RawSQL which causes issues for backends that specialize the treatment of null ordering.
2022-09-13Fixed #33996 -- Fixed CheckConstraint validation on NULL values.David Sanders
Bug in 667105877e6723c6985399803a364848891513cc. Thanks James Beith for the report.
2022-06-27Refs #32786 -- Made query clear ordering when ordered combined queryset is ↵Mariusz Felisiak
used in subquery on Oracle.
2022-06-27Fixed #33796 -- Fixed ordered combined queryset crash when used in subquery ↵Mariusz Felisiak
on PostgreSQL and MySQL. Thanks Shai Berger for the report. Regression in 30a01441347d5a2146af2944b29778fa0834d4be.
2022-06-01Fixed #32234 -- Made inspectdb inform about composite primary keys.Anv3sh
2022-05-12Refs #27064 -- Added RenameIndex migration operation.David Wobrock
2022-05-02Fixed #33413 -- Made migrations propage collations to related fields.David Wobrock
2022-02-22Refs #33517 -- Prevented __second lookup from returning fractional seconds ↵nabil-rady
on PostgreSQL.
2022-02-18Fixed #33379 -- Added minimum database version checks.Hasan Ramezani
Thanks Tim Graham for the review.