tortoise/tortoise-orm

Feature request: filter like and ilike

Open

#421 aperta il 29 mag 2020

Vedi su GitHub
 (9 commenti) (0 reazioni) (1 assegnatario)Python (333 fork)batch import
enhancementgood first issue

Metriche repository

Star
 (3863 star)
Metriche merge PR
 (Merge medio 15g 7h) (9 PR mergiate in 30 g)

Descrizione

Example of usage:

users = await User.filter(first_name__ilike="c%r")

I know this can be done with startswith and endswith, but there are cases where using the LIKE operator is better:

users = await User.filter(first_name__ilike="j_r%")

This would be used to match Jeremy, Jorge, Jordan...

Guida contributor