tortoise/tortoise-orm

Feature request: filter like and ilike

オープン

#421 opened on 2020/05/29

 (9 件のコメント) (0 件のリアクション) (1 人の担当者)Python (333 件のフォーク)batch import
enhancementgood first issue

Repository metrics

Stars
 (3,863 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

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