Closed henadzit closed 1 week ago
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
tortoise/queryset.py | 103 | 109 | 94.5% | ||
<!-- | Total: | 146 | 152 | 96.05% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
tortoise/backends/mysql/executor.py | 3 | 88.89% | ||
<!-- | Total: | 3 | --> |
Totals | |
---|---|
Change from base Build 11922917874: | 0.03% |
Covered Lines: | 6246 |
Relevant Lines: | 6867 |
@abondar, I replaced pypika's version, can you approve again? thanks!
Description
This PR:
.count()
,exists()
,.values()
,.values_list()
). It does NOT implement parametrization of UPDATE and DELETE queries. I'll work on UPDATE and DELETE parametrization as part of a separate PR since this one is already quite big.AwaitableQuery._execute
uses the same SQL as returned byAwaitableQuery.sql()
by changing the signatures of_execute
and_make_query
.This PR is dependent on changes in pypika-tortoise https://github.com/tortoise/pypika-tortoise/pull/16. ⚠️ we should merge them first and release a new version of
pypika-tortoise
!Motivation and Context
Parameterized queries are crucial for preventing SQL injection attacks and but also can improve performance of database operations.
How Has This Been Tested?
Checklist: