Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parametred Update/Delete support. #177

Merged
merged 5 commits into from
Sep 1, 2019
Merged

Parametred Update/Delete support. #177

merged 5 commits into from
Sep 1, 2019

Conversation

grigi
Copy link
Member

@grigi grigi commented Aug 29, 2019

Progress on #81

This PR adds capability to allow parameterd queries, and then connects it up for Updates(.save()) and Deletes.
(Not queryset updates, that is a separate issue).

This is a step towards hardening Tortoise ORM. It also SIGNIFICANTLY improves performance for full Updates, partial Updates and Deletes.

Done:

  • Parameterd Delete
  • Parametered Update PK-match
  • Parametered Full-Update values
  • Parametered Partial-Update values
  • execute_query accepts parameters for SQLite
  • execute_query accepts parameters for MySQL
  • execute_query accepts parameters for PostgreSQL
  • Cleanup/refactor

Added for deletes.
Partially added for updates.

Cache deletes for performance.
@coveralls
Copy link

coveralls commented Aug 29, 2019

Pull Request Test Coverage Report for Build 674

  • 55 of 55 (100.0%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 97.307%

Totals Coverage Status
Change from base Build 663: 0.04%
Covered Lines: 2793
Relevant Lines: 2837

💛 - Coveralls

@grigi grigi changed the title [WIP]Added Optional parametred queries support. Parametred Update/Delete support. Aug 30, 2019
@grigi grigi requested a review from abondar August 30, 2019 12:38
@grigi
Copy link
Member Author

grigi commented Aug 30, 2019

@abondar Please review

@grigi grigi merged commit 0e2cf36 into master Sep 1, 2019
@grigi grigi deleted the parametred_del_upd branch September 5, 2019 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants