Open larsschwegmann opened 1 month ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
tortoise/filters.py | 1 | 2 | 50.0% | ||
tortoise/contrib/postgres/regex.py | 3 | 5 | 60.0% | ||
tortoise/contrib/sqlite/regex.py | 6 | 8 | 75.0% | ||
<!-- | Total: | 14 | 19 | 73.68% | --> |
Totals | |
---|---|
Change from base Build 11323175489: | -0.02% |
Covered Lines: | 5993 |
Relevant Lines: | 6620 |
@larsschwegmann Hi!
Sorry I didn't pay attention to this PR, seems like I missed it
Could you please add some tests for that feature?
This PR adds support for case insentive regex filtering (postgres and sqlite). It also adds support for the REGEXP sqlite module (needs to be installed in sqlite to work).
Description
Postgres and SQLite offer ways to query with regular expression while ignoring case, similiarly how we already have case insensitive contains, etc. This PR adds support for these filters.
This PR also adds support for SQLite (regexp() function needs to be supplied at runtime, e.g. via an extension). It is installed by default on most linux distributions of sqlite.
Motivation and Context
I want to query case insensitive regex patterns. Having sqlite support is good for completeness. Many people including me use sqlite for unit tests, so having feature parity across db backends is aa big plus.
How Has This Been Tested?
Ran the tests suite
Checklist: