summaryrefslogtreecommitdiff
path: root/tests/queries/test_query.py
AgeCommit message (Collapse)Author
2022-12-02Refs #33308 -- Avoided passing None to RawSQL's params.Florian Apolloner
Passing None to params causes errors in determining the data type on psycopg3.
2022-07-27Used AND, OR, XOR constants instead of hard-coded values.Nick Pope
2022-03-16Refs #30581 -- Allowed sql.Query to be used without model.Gagaro
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-11-19Refs #24121 -- Added __repr__() to BaseDatabaseWrapper, JoinPromoter, and ↵Jonny Park
SQLCompiler.
2021-04-28Fixed #32632, Fixed #32657 -- Removed flawed support for Subquery ↵Simon Charette
deconstruction. Subquery deconstruction support required implementing complex and expensive equality rules for sql.Query objects for little benefit as the latter cannot themselves be made deconstructible to their reference to model classes. Making Expression @deconstructible and not BaseExpression allows interested parties to conform to the "expression" API even if they are not deconstructible as it's only a requirement for expressions allowed in Model fields and meta options (e.g. constraints, indexes). Thanks Phillip Cutter for the report. This also fixes a performance regression in bbf141bcdc31f1324048af9233583a523ac54c94.
2020-10-28Refs #27149 -- Fixed sql.Query identity.Simon Charette
By making Query subclass BaseExpression in 35431298226165986ad07e91f9d3aca721ff38ec the former defined it's identity based off _construct_args which is not appropriate.
2019-11-21Refs #25367 -- Made Query.build_filter() raise TypeError on non-conditional ↵Simon Charette
expressions.
2019-11-21Fixed #30484 -- Added conditional expressions support to CheckConstraint.Simon Charette
2019-11-21Refs #11964 -- Removed SimpleCol in favor of Query(alias_cols).Simon Charette
This prevent having to pass simple_col through multiple function calls by defining whether or not references should be resolved with aliases at the Query level.
2019-11-13Fixed #30971 -- Prevented Query.resolve_lookup_value() from coercing list ↵George Marshall
values to tuples. Regression in 8a281aa7fe76a9da2284f943964a9413697cff1f.
2019-09-24Fixed #30796 -- Prevented select_related() from mutating a queryset on chaining.Simon Charette
Thanks Darren Maki for the report.
2019-04-30Fixed #30412 -- Fixed crash when adding check constraints with OR'ed ↵can
condition on Oracle and SQLite.
2018-11-27Switched TestCase to SimpleTestCase where possible in Django's tests.Tim Graham
2018-08-21Fixed #29658 -- Registered model lookups in tests with a context manager.Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)
2018-07-10Fixed #11964 -- Added support for database check constraints.Ian Foote