Skip to content

Conversation

@abondar
Copy link
Member

@abondar abondar commented Jan 28, 2026

Introducing helper to run pypika Query, so that users can run theirs custom queries through Tortoise tooling, providing clean access to building queries with Table interface and automatic connection management for 1 db scenarios

Also removed codacy as it was giving a lot of false positives, I am happy with our integrated linters for now

Motivation and Context

Right now - you can do basically the same, if you go deep in internal interfaces and combine such setup yourself
With helper it should be more straightforward, so users would be more encouraged to write their own custom queries, not restrained by Model boundaries

How Has This Been Tested?

Ran on non-oracle backends, tried to make behaviour consistent

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 28, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing feature/query-api (2602fb5) with develop (5edbcf2)

Summary

✅ 16 untouched benchmarks

@abondar abondar changed the title Introduce query api, helper for pypika Query Introduce query api, helper for pypika Query, remove codacy Jan 28, 2026
@coveralls
Copy link

Pull Request Test Coverage Report for Build 21454019103

Details

  • 66 of 68 (97.06%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 85.299%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tortoise/backends/base/client.py 4 5 80.0%
tortoise/query_api.py 47 48 97.92%
Totals Coverage Status
Change from base Build 21430861593: 0.07%
Covered Lines: 9442
Relevant Lines: 10710

💛 - Coveralls

@abondar abondar merged commit c68dfad into develop Jan 28, 2026
14 checks passed
@abondar abondar deleted the feature/query-api branch January 28, 2026 21:20
@abondar abondar mentioned this pull request Jan 29, 2026
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.

3 participants