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

貢獻者指南