Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed #28553 -- Fixed annotation mismatch with ↵ | David Wobrock | 2023-03-24 | 1 | -1/+15 |
| | | | | | | QuerySet.values()/values_list() on compound queries. Co-authored-by: Matthias Kestenholz <mk@feinheit.ch> | ||||
* | Refs #31445 -- Added test for nesting QuerySet.union(). | Mariusz Felisiak | 2023-02-21 | 1 | -0/+9 |
| | | | This was fixed in MySQL 8.0.31. | ||||
* | Fixed #34267 -- Fixed sliced QuerySet.union() crash. | Francesco Panico | 2023-01-20 | 1 | -4/+12 |
| | | | | | | Regression in 3d734c09ff0138441dfe0a59010435871d17950f. Thanks Raphaël Stefanini for the report. | ||||
* | Refs #31486 -- Removed ability to pass unsaved model instances to related ↵ | Mariusz Felisiak | 2023-01-17 | 1 | -27/+9 |
| | | | | | | filters. Per deprecation timeline. | ||||
* | Removed unnecessary commas in tests. | Mariusz Felisiak | 2022-12-21 | 1 | -3/+1 |
| | |||||
* | Refs #33308 -- Avoided passing None to RawSQL's params. | Florian Apolloner | 2022-12-02 | 1 | -4/+3 |
| | | | | | Passing None to params causes errors in determining the data type on psycopg3. | ||||
* | Refs #33050 -- Added test for QuerySet.count() on combined queries with ↵ | Mariusz Felisiak | 2022-11-23 | 1 | -0/+6 |
| | | | | | | | select_related(). Thanks Simon Charette for noticing this. Fixed in 70499b25c708557fb9ee2264686cd172f4b2354e. | ||||
* | Fixed #34123 -- Fixed combinator order by alias when using select_related(). | Simon Charette | 2022-11-15 | 1 | -0/+28 |
| | | | | | | | | Regression in c58a8acd413ccc992dd30afd98ed900897e1f719. Thanks to Shai Berger for the report and tests. Co-Authored-By: David Sanders <shang.xiao.sanders@gmail.com> | ||||
* | Refs #33374 -- Adjusted full match condition handling. | Simon Charette | 2022-11-07 | 1 | -7/+13 |
| | | | | | | Adjusting WhereNode.as_sql() to raise an exception when encoutering a full match just like with empty matches ensures that all case are explicitly handled. | ||||
* | Fixed #16211 -- Added logical NOT support to F expressions. | David Wobrock | 2022-10-31 | 1 | -2/+2 |
| | |||||
* | Fixed #34125 -- Fixed sliced QuerySet.union() crash on a single non-empty ↵ | Simon Charette | 2022-10-29 | 1 | -0/+26 |
| | | | | | | | | | queryset. The bug existed since sliced query union was added but was elevated to query union slices by moving the .exists() optimization to the compiler in 3d734c09ff0138441dfe0a59010435871d17950f. Thanks Stefan Hammer for the report. | ||||
* | Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵ | Gregor Gärtner | 2022-10-08 | 2 | -28/+28 |
| | | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com> | ||||
* | Replaced assertQuerysetEqual() to assertSequenceEqual()/assertCountEqual() ↵ | Mariusz Felisiak | 2022-10-07 | 1 | -23/+23 |
| | | | | | where appropriate. Follow up to 3f7b3275627385f8f7531fca01cdda50d4ec6b6e. | ||||
* | Fixed #33768 -- Fixed ordering compound queries by nulls_first/nulls_last on ↵ | Simon Charette | 2022-10-05 | 1 | -0/+18 |
| | | | | | | | | | | | 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. | ||||
* | Fixed #34012 -- Made QuerySet.order_by() apply transforms on related fields ↵ | David Sanders | 2022-10-04 | 1 | -0/+3 |
| | | | | | | | | | | | for models with Meta.ordering. This makes QuerySet.order_by() no longer ignore trailing transforms for models with Meta.ordering. As a consequence, FieldError is raised in such cases for non-existent fields. Thanks to Klaas van Schelven for the report and Mariusz Felisiak for the review and advice. | ||||
* | Refs #34012 -- Added test for ordering by transform of related fields. | Mariusz Felisiak | 2022-09-22 | 1 | -0/+14 |
| | |||||
* | Fixed #34015 -- Allowed filtering by transforms on relation fields. | Mariusz Felisiak | 2022-09-22 | 2 | -3/+33 |
| | |||||
* | Fixed #21204 -- Tracked field deferrals by field instead of models. | Simon Charette | 2022-08-30 | 1 | -6/+0 |
| | | | | | This ensures field deferral works properly when a model is involved more than once in the same query with a distinct deferral mask. | ||||
* | Refs #32948, Refs #32946 -- Used Q.create() internally for dynamic Q() objects. | Nick Pope | 2022-07-27 | 1 | -0/+9 |
| | | | | | | | | | Node.create() which has a compatible signature with Node.__init__() takes in a single `children` argument rather than relying in unpacking *args in Q.__init__() which calls Node.__init__(). In addition, we were often needing to unpack iterables into *args and can instead pass a list direct to Node.create(). | ||||
* | Used AND, OR, XOR constants instead of hard-coded values. | Nick Pope | 2022-07-27 | 3 | -11/+11 |
| | |||||
* | Fixed #33796 -- Fixed ordered combined queryset crash when used in subquery ↵ | Mariusz Felisiak | 2022-06-27 | 1 | -0/+22 |
| | | | | | | | | on PostgreSQL and MySQL. Thanks Shai Berger for the report. Regression in 30a01441347d5a2146af2944b29778fa0834d4be. | ||||
* | Made QuerySet.bulk_update() raise an error when batch_size is zero. | Ebram Shehata | 2022-06-13 | 1 | -0/+2 |
| | |||||
* | Fixed #33717 -- Dropped support for PostgreSQL 11. | Mariusz Felisiak | 2022-05-19 | 1 | -2/+1 |
| | |||||
* | Refs #30581 -- Added Q.check() hook. | Gagaro | 2022-05-04 | 1 | -1/+39 |
| | |||||
* | Refs #30581 -- Added Q.flatten(). | Gagaro | 2022-05-03 | 1 | -1/+27 |
| | |||||
* | Refs #32226 -- Fixed JSON format of QuerySet.explain() on PostgreSQL when ↵ | Mariusz Felisiak | 2022-04-19 | 1 | -2/+4 |
| | | | | | format is uppercased. Follow up to aba9c2de669dcc0278c7ffde7981be91801be00b. | ||||
* | Relaxed some query ordering assertions in various tests. | Mariusz Felisiak | 2022-04-14 | 1 | -2/+2 |
| | | | It accounts for differences seen on MySQL with MyISAM storage engine. | ||||
* | Made select_for_update() don't raise TransactionManagementError on databases ↵ | Mariusz Felisiak | 2022-04-14 | 1 | -12/+4 |
| | | | | that don't support transactions. | ||||
* | Expanded QuerySet.explain() error message if a backend supports no formats. | Tim Graham | 2022-04-14 | 1 | -0/+2 |
| | |||||
* | Improved ExplainTests.test_basic(). | Mariusz Felisiak | 2022-04-13 | 1 | -7/+14 |
| | | | | QuerySet.select_for_update() is not supported by all databases. Moreover it cannot be used outside of a transaction. | ||||
* | Fixed #24296 -- Made QuerySet.exists() clear selected columns for not sliced ↵ | mgaligniana | 2022-04-12 | 1 | -0/+8 |
| | | | | distinct querysets. | ||||
* | Refs #18414 -- Added tests for selected columns of sliced distinct querysets. | mgaligniana | 2022-04-12 | 1 | -0/+8 |
| | |||||
* | Removed DatabaseFeatures.validates_explain_options. | Mariusz Felisiak | 2022-04-11 | 1 | -1/+0 |
| | | | Always True since 6723a26e59b0b5429a0c5873941e01a2e1bdbb81. | ||||
* | Fixed CVE-2022-28347 -- Protected QuerySet.explain(**options) against SQL ↵ | Mariusz Felisiak | 2022-04-11 | 1 | -2/+31 |
| | | | | injection on PostgreSQL. | ||||
* | Fixed CVE-2022-28346 -- Protected QuerySet.annotate(), aggregate(), and ↵ | Mariusz Felisiak | 2022-04-11 | 1 | -0/+9 |
| | | | | | | | | extra() against SQL injection in column aliases. Thanks Splunk team: Preston Elder, Jacob Davis, Jacob Moore, Matt Hanson, David Briggs, and a security researcher: Danylo Dmytriiev (DDV_UA) for the report. | ||||
* | Refs #30581 -- Allowed sql.Query to be used without model. | Gagaro | 2022-03-16 | 1 | -3/+62 |
| | |||||
* | Fixed #29865 -- Added logical XOR support for Q() and querysets. | Ryan Heard | 2022-03-04 | 3 | -0/+76 |
| | |||||
* | Fixed #31486 -- Deprecated passing unsaved objects to related filters. | Albert Defler | 2022-02-25 | 1 | -1/+29 |
| | | | | Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com> | ||||
* | Removed redundant QuerySet.all() calls in docs and tests. | Nick Pope | 2022-02-22 | 3 | -14/+14 |
| | | | | Most QuerySet methods are mapped onto the Manager and, in general, it isn't necessary to call .all() on the manager. | ||||
* | Fixed #33506 -- Made QuerySet.bulk_update() perform atomic writes against ↵ | Simon Charette | 2022-02-09 | 1 | -1/+27 |
| | | | | | | | | | | | | | | write database. The lack of _for_write = True assignment in bulk_update prior to accessing self.db resulted in the db_for_read database being used to wrap batched UPDATEs in a transaction. Also tweaked the batch queryset creation to also ensure they are executed against the same database as the opened transaction under all circumstances. Refs #23646, #33501. | ||||
* | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | 2022-02-07 | 1 | -4/+10 |
| | |||||
* | Refs #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 11 | -1554/+2110 |
| | |||||
* | Refs #33476 -- Refactored problematic code before reformatting by Black. | Mariusz Felisiak | 2022-02-03 | 1 | -2/+1 |
| | | | | | | | | | | | | | | | | | In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], ) | ||||
* | Fixed #33463 -- Fixed QuerySet.bulk_update() with F() expressions. | Jörg Breitbart | 2022-01-27 | 1 | -0/+10 |
| | |||||
* | Fixed #29338 -- Allowed using combined queryset in Subquery. | Mariusz Felisiak | 2022-01-17 | 1 | -2/+35 |
| | | | | Thanks Eugene Kovalev for the initial patch, Simon Charette for the review, and Chetan Khanna for help. | ||||
* | Fixed #33319 -- Fixed crash when combining with the | operator querysets ↵ | Ömer Faruk Abacı | 2021-12-08 | 2 | -2/+23 |
| | | | | with aliases that conflict. | ||||
* | Fixed #33322 -- Fixed loss of assigned related object when saving relation ↵ | Hannes Ljungberg | 2021-11-29 | 1 | -1/+31 |
| | | | | with bulk_update(). | ||||
* | Refs #24121 -- Added __repr__() to BaseDatabaseWrapper, JoinPromoter, and ↵ | Jonny Park | 2021-11-19 | 2 | -1/+26 |
| | | | | SQLCompiler. | ||||
* | Refs #25467 -- Added test for excluding one-to-one relation with unsaved ↵ | Jacob Walls | 2021-10-08 | 1 | -0/+8 |
| | | | | | | objects. Fixed in 58da81a5a372a69f0bac801c412b57f3cce5f188. | ||||
* | Fixed tests.queries.models.StaffUser.__str__(). | Jacob Walls | 2021-10-08 | 1 | -1/+1 |
| |