tortoise/tortoise-orm

Feature request: filter like and ilike

开放

#421 创建于 2020年5月29日

 (9 条评论) (0 个反应) (1 位负责人)Python (333 个派生)batch import
enhancementgood first issue

仓库指标

星标
 (3,863 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南