summaryrefslogtreecommitdiff
path: root/tests/db_functions
AgeCommit message (Collapse)Author
2021-11-12[4.0.x] Fixed #33279 -- Fixed handling time zones with "-" sign in names.Can Sarigol
Thanks yakimka for the report. Regression in fde9b7d35e4e185903cc14aa587ca870037941b1. Backport of 661316b066923493ff91d6d2aa92e463f595a6b1 from main.
2021-09-29[4.0.x] Fixed #33018 -- Fixed annotations with empty queryset.David Wobrock
Thanks Simon Charette for the review and implementation idea. Backport of dd1fa3a31b4680c0d3712e6ae122b878138580c7 from main
2021-09-16Fixed #32365 -- Made zoneinfo the default timezone implementation.Carlton Gibson
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick Pope, and Paul Ganssle for reviews.
2021-07-15Refs #32508 -- Raised Type/ValueError instead of using "assert" in ↵Daniyal
django.db.models. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
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-05-17Fixed #32750 -- Fixed crash of Extract() transform on OuterRef() expressions.Artur Beltsov
Thanks Simon Charette for the review.
2021-05-11Fixed #32722 -- Fixed comparing to TruncTime() on Oracle.Mariusz Felisiak
2021-05-07Fixed #32699 -- Fixed comparing to TruncTime() with 0 microseconds on MySQL.Alex Hill
2021-03-29Fixed #31487 -- Added precision argument to Round().Nick Pope
2021-03-23Fixed #32573 -- Fixed bounds in __iso_year lookup optimization.Florian Demmer
2021-01-29Fixed #32392 -- Fixed ExclusionConstraint crash with Cast() in expressions.Tilman Koschnick
2021-01-19Refs #32365 -- Allowed use of non-pytz timezone implementations.Paul Ganssle
2020-12-10Fixed #32178 -- Allowed database backends to skip tests and mark expected ↵Hasan Ramezani
failures. Co-authored-by: Tim Graham <timograham@gmail.com>
2020-12-02Fixed #32179 -- Added JSONObject database function.Artur Beltsov
2020-10-14Fixed #31640 -- Made Trunc() truncate datetimes to Date/TimeField in a ↵David-Wobrock
specific timezone.
2020-10-14Removed redundant tests in test_extract_trunc.David-Wobrock
tzinfo is ignored for DateFields and TimeFields, and it's already covered by DateFunctionTests.test_trunc_func().
2020-10-14Refs #31640 -- Made Extract raise ValueError when using tzinfo with ↵David-Wobrock
Date/TimeField.
2020-10-02Fixed #32060 -- Added Random database function.Nick Pope
2020-09-18Refs #21181 -- Corrected DatabaseFeatures.test_collations for Swedish collation.Tom Carrick
Previously, backends used different keys "swedish-ci" or "swedish_ci".
2020-09-09Fixed #31987 -- Fixed Cast() with DurationField on MySQL.Petr Čermák
2020-09-02Fixed #31948 -- Added tzinfo parameter to TruncDate() and TruncTime().Joe Jackson
2020-08-11Fixed #21181 -- Added Collate database function.Tom Carrick
Thanks Simon Charette for reviews.
2020-06-16Refs #30446 -- Defined default output_field of text database functions.Simon Charette
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)).
2020-04-30Removed unused __str__() methods in tests models.Mariusz Felisiak
Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2019-11-19Fixed #30987 -- Added models.PositiveBigIntegerField.Caio Ariede
2019-11-19Removed unnecessary numeric indexes in format strings.Jon Dufresne
2019-10-29Used more specific unittest assertions in tests.Nick Pope
* 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.
2019-10-02Fixed #30821 -- Added ExtractIsoWeekYear database function and iso_week_day ↵Anatol Ulrich
lookup.
2019-08-02Fixed #30661 -- Added models.SmallAutoField.Nick Pope
2019-07-12Fixed #30602 -- Made Extract raise ValueError when using unsupported lookups ↵Hasan Ramezani
for DurationField.
2019-06-13Fixed #30128 -- Fixed handling timedelta timezone in database functions.can
2019-05-21Fixed #29396 -- Added indirect values support to __year lookups.Simon Charette
Thanks Windson Yang for the initial patch.
2019-05-21Fixed #30494 -- Disabled __year lookup optimization for indirect values.Simon Charette
The previous heuristics were naively enabling the BETWEEN optimization on successful cast of the first rhs SQL params to an integer while it was not appropriate for a lot of database resolved expressions. Thanks Alexey Chernov for the report.
2019-03-22Fixed #30271 -- Added the Sign database function.Nick Pope
2019-03-20Fixed #30240 -- Added SHA1, SHA224, SHA256, SHA384, and SHA512 database ↵Nick Pope
functions. Thanks Mariusz Felisiak and Tim Graham for reviews.
2019-03-14Simplified test_transform()s in db_functions.math.Mariusz Felisiak
2019-03-07Fixed #29754 -- Added is_dst parameter to Trunc database functions.ahbk
2019-02-21Refs #28643 -- Added MD5 database function.Mariusz Felisiak
Thanks Tim Graham, Nick Pope and Simon Charette for reviews.
2019-01-12Refs #28643 -- Added Reverse database function.Nick Pope
Thanks Mariusz Felisiak for Oracle advice and review.
2019-01-10Refs #28643 -- Added NullIf database function.Mads Jensen
Thanks Nick Pope, Mariusz Felisiak, and Tim Graham for reviews.
2018-10-15Fixed #29845 -- Fixed Cast crash on MySQL when casting to DecimalField.Mariusz Felisiak
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-09-10Fixed #29500 -- Fixed SQLite function crashes on null values.Srinivas Reddy Thatiparthy
Co-authored-by: Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com> Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2018-08-21Fixed #29658 -- Registered model lookups in tests with a context manager.Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)
2018-08-18Fixed #28649 -- Added ExtractIsoYear database function and iso_year lookup.Sigurd Ljødal
2018-08-16Reorganized datetime db function tests.Nick Pope
2018-08-16Reorganized comparison db function tests.Nick Pope
2018-08-16Reorganized text db function tests.Nick Pope
2018-08-16Reorganized window db function tests.Nick Pope