tortoise/tortoise-orm

Feature request: filter like and ilike

Open

#421 opened on 2020年5月29日

GitHub で見る
 (9 comments) (0 reactions) (1 assignee)Python (333 forks)batch import
enhancementgood first issue

Repository metrics

Stars
 (3,863 stars)
PR merge metrics
 (平均マージ 15d 7h) (30d で 9 merged PRs)

説明

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

コントリビューターガイド