tortoise / tortoise/tortoise-orm

Feature request: filter like and ilike

Open
#421 9 comments 0 reactions 1 assignee View on GitHub

@WisdomPill is already working on this.

Since May 29, 2020.

enhancement good first issue
Dominant language
Python
Stars
5.6k
Forks
516
Avg merge
2d 21h
Merged PRs (30d)
9

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.