summaryrefslogtreecommitdiff
path: root/tests/db_functions
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #34554 -- Fixed Reverse(Value(…)) crash on Oracle.Mariusz Felisiak2023-05-101-6/+9
|
* Fixed #34480 -- Fixed crash of annotations with Chr().Jacob Walls2023-04-111-1/+11
|
* Refs #28329 -- Fixed Cast() with ForeignKey to integer fields on MySQL.David Wobrock2023-03-141-0/+9
|
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-011-1/+0
| | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
* Fixed #34233 -- Dropped support for Python 3.8 and 3.9.Mariusz Felisiak2023-01-181-5/+1
|
* Refs #32365 -- Removed support for pytz timezones per deprecation timeline.Mariusz Felisiak2023-01-171-292/+212
|
* Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo2022-12-151-1/+1
| | | | | | | 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>
* Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner2022-10-0817-113/+113
| | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
* Fixed #34070 -- Added subsecond support to Now() on SQLite and MySQL.Lily Foote2022-10-031-1/+17
|
* Refs #27412 -- Confirmed support for executing Coalesce(subquery).Simon Charette2022-08-241-4/+7
| | | | | | | | This has been supported for subqueries wrapped in Subquery since the expression was introduced and for Queryset directly since Subquery resolves to sql.Query. Piggy-backed on the existing tests covering Coalesce handling of EmptyResultSet as it seemed like a proper location to combine testing.
* Refs #27236 -- Reverted "Refs #27236 -- Added generic mechanism to handle ↵Mariusz Felisiak2022-07-261-14/+3
| | | | | | the deprecation of migration operations." This reverts commit 41019e48bbf082c985e6ba3bad34d118b903bff1.
* Refs #27236 -- Added generic mechanism to handle the deprecation of ↵David Wobrock2022-07-081-3/+14
| | | | migration operations.
* Refs CVE-2022-34265 -- Properly escaped Extract() and Trunc() parameters.Simon Charette2022-07-061-5/+9
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed CVE-2022-34265 -- Protected Trunc(kind)/Extract(lookup_name) against ↵Mariusz Felisiak2022-07-041-0/+34
| | | | | | SQL injection. Thanks Takuto Yoshikai (Aeye Security Lab) for the report.
* Relaxed some query ordering assertions in various tests.Mariusz Felisiak2022-04-141-2/+2
| | | It accounts for differences seen on MySQL with MyISAM storage engine.
* Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson2022-03-241-5/+4
| | | | | Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
* Refs #33517 -- Prevented __second lookup from returning fractional seconds ↵nabil-rady2022-02-221-0/+16
| | | | on PostgreSQL.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-074-9/+22
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-0756-1448/+2192
|
* Refs #33355 -- Added missing tests for database functions and expression on ↵Adam Johnson2021-12-225-0/+9
| | | | null values.
* Refs #33355 -- Fixed Trunc() with years < 1000 on SQLite.Adam Johnson2021-12-131-4/+14
| | | | | | Thanks to Nick Pope for spotting the bug in Code Review. Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
* Refs #33355 -- Moved Trunc() assertions for invalid arguments and ISO 8601 ↵Mariusz Felisiak2021-12-131-22/+56
| | | | week to separate tests.
* Fixed #33279 -- Fixed handling time zones with "-" sign in names.Can Sarigol2021-11-121-0/+23
| | | | | | Thanks yakimka for the report. Regression in fde9b7d35e4e185903cc14aa587ca870037941b1.
* Fixed #33018 -- Fixed annotations with empty queryset.David Wobrock2021-09-291-1/+12
| | | | Thanks Simon Charette for the review and implementation idea.
* Fixed #32365 -- Made zoneinfo the default timezone implementation.Carlton Gibson2021-09-161-93/+105
| | | | | Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick Pope, and Paul Ganssle for reviews.
* Refs #32508 -- Raised Type/ValueError instead of using "assert" in ↵Daniyal2021-07-151-1/+2
| | | | | | django.db.models. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Refs #32858, Refs #32392 -- Restored using :: shortcut syntax in Cast() on ↵Mariusz Felisiak2021-06-221-0/+17
| | | | | | | PostgreSQL. This partly reverts commit fdfbc66331292def201c9344e3cd29fbcbcd076a unnecessary since b69b0c3fe871167a0ca01bb439508e335143801f.
* Fixed #32750 -- Fixed crash of Extract() transform on OuterRef() expressions.Artur Beltsov2021-05-171-0/+34
| | | | Thanks Simon Charette for the review.
* Fixed #32722 -- Fixed comparing to TruncTime() on Oracle.Mariusz Felisiak2021-05-111-6/+15
|
* Fixed #32699 -- Fixed comparing to TruncTime() with 0 microseconds on MySQL.Alex Hill2021-05-071-0/+16
|
* Fixed #31487 -- Added precision argument to Round().Nick Pope2021-03-293-3/+79
|
* Fixed #32573 -- Fixed bounds in __iso_year lookup optimization.Florian Demmer2021-03-231-3/+16
|
* Fixed #32392 -- Fixed ExclusionConstraint crash with Cast() in expressions.Tilman Koschnick2021-01-291-14/+1
|
* Refs #32365 -- Allowed use of non-pytz timezone implementations.Paul Ganssle2021-01-191-179/+204
|
* Fixed #32178 -- Allowed database backends to skip tests and mark expected ↵Hasan Ramezani2020-12-103-6/+2
| | | | | failures. Co-authored-by: Tim Graham <timograham@gmail.com>
* Fixed #32179 -- Added JSONObject database function.Artur Beltsov2020-12-021-0/+82
|
* Fixed #31640 -- Made Trunc() truncate datetimes to Date/TimeField in a ↵David-Wobrock2020-10-141-0/+81
| | | | specific timezone.
* Removed redundant tests in test_extract_trunc.David-Wobrock2020-10-141-32/+0
| | | | | tzinfo is ignored for DateFields and TimeFields, and it's already covered by DateFunctionTests.test_trunc_func().
* Refs #31640 -- Made Extract raise ValueError when using tzinfo with ↵David-Wobrock2020-10-141-0/+12
| | | | Date/TimeField.
* Fixed #32060 -- Added Random database function.Nick Pope2020-10-021-0/+13
|
* Refs #21181 -- Corrected DatabaseFeatures.test_collations for Swedish collation.Tom Carrick2020-09-181-1/+1
| | | | Previously, backends used different keys "swedish-ci" or "swedish_ci".
* Fixed #31987 -- Fixed Cast() with DurationField on MySQL.Petr Čermák2020-09-091-0/+10
|
* Fixed #31948 -- Added tzinfo parameter to TruncDate() and TruncTime().Joe Jackson2020-09-021-0/+10
|
* Fixed #21181 -- Added Collate database function.Tom Carrick2020-08-111-0/+56
| | | | Thanks Simon Charette for reviews.
* Refs #30446 -- Defined default output_field of text database functions.Simon Charette2020-06-165-11/+11
| | | | | | | This prevented the default behavior of BaseExpression._resolve_output_field from error'ing out when such functions accepted both expressions from mixed types (e.g. SubStr(CharField, IntegerField, IntegerField)).
* Removed unused __str__() methods in tests models.Mariusz Felisiak2020-04-301-12/+0
| | | Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
* Simplified imports from django.db and django.contrib.gis.db.Nick Pope2020-02-042-6/+3
|
* Fixed #30987 -- Added models.PositiveBigIntegerField.Caio Ariede2019-11-191-0/+1
|
* Removed unnecessary numeric indexes in format strings.Jon Dufresne2019-11-191-1/+1
|
* Used more specific unittest assertions in tests.Nick Pope2019-10-291-7/+7
| | | | | | | | | | | | * assertIsNone()/assertIsNotNone() instead of comparing to None. * assertLess() for < comparisons. * assertIs() for 'is' expressions. * assertIsInstance() for isinstance() expressions. * rounding of assertAlmostEqual() for round() expressions. * assertIs(..., True/False) instead of comparing to True/False. * assertIs()/assertIsNot() for ==/!= comparisons. * assertNotEqual() for == comparisons. * assertTrue()/assertFalse() instead of comparing to True/False.