tortoise/tortoise-orm

Feature request: filter like and ilike

Open

#421 建立於 2020年5月29日

在 GitHub 查看
 (9 留言) (0 反應) (1 負責人)Python (3,863 star) (333 fork)batch import
enhancementgood first issue

描述

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

貢獻者指南