tortoise/tortoise-orm

Feature request: filter like and ilike

Aberta

#421 aberto em 29 de mai. de 2020

 (9 comentários) (0 reação) (1 responsável)Python (333 forks)batch import
enhancementgood first issue

Métricas do repositório

Stars
 (3.863 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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...

Guia do colaborador