tortoise / tortoise-orm

Familiar asyncio ORM for python, built with relations in mind
https://tortoise.github.io
Apache License 2.0
4.69k stars 390 forks source link

Parametrize UPDATE, DELETE and bulk operations #1785

Open henadzit opened 1 day ago

henadzit commented 1 day ago

Description

It's a follow up to https://github.com/tortoise/tortoise-orm/pull/1777.

From my knowledge this should be the last bit of parametrization work.

⚠️ we should not merge it until https://github.com/tortoise/pypika-tortoise/pull/17 is merged and a new version is released.

Motivation and Context

Parameterized queries are crucial for preventing SQL injection attacks and but also can improve performance of database operations.

Related ticket https://github.com/tortoise/tortoise-orm/issues/81 v1.0.0 target https://github.com/tortoise/tortoise-orm/issues/19

How Has This Been Tested?

Checklist:

coveralls commented 1 day ago

Pull Request Test Coverage Report for Build 11996286319

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
tortoise/queryset.py 28 29 96.55%
<!-- Total: 34 35 97.14% -->
Totals Coverage Status
Change from base Build 11994314143: 0.1%
Covered Lines: 6239
Relevant Lines: 6854

💛 - Coveralls