Skip to content

Commit

Permalink
Update queries.md
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhgharatpara authored Aug 19, 2024
1 parent f94d306 commit 883be04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/en/docs/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ The same special operators are also automatically added on every column.
* **asc** - Filter instances by ascending order where `_asc=True`.
* **desc** - Filter instances by descending order where `_desc=True`.
* **neq** - Filter instances by not equal to condition.
* **startswith** - Filter instances that start with a specific value.
* **endswith** - Filter instances that end with a specific value.
* **istartswith** - Filter instances that start with a specific value, case-insensitive.
* **iendswith** - Filter instances that end with a specific value, case-insensitive.

##### Example

Expand All @@ -145,6 +149,10 @@ users = await User.objects.filter(id__asc=False) # same as desc True
users = await User.objects.filter(id__desc=True)
users = await User.objects.filter(id__desc=False) # same as asc True
users = await User.objects.filter(id__neq=1) # same as asc True
users = await User.objects.filter(name__startswith="foo")
users = await User.objects.filter(name__istartswith="foo")
users = await User.objects.filter(name__endswith="foo")
users = await User.objects.filter(name__iendswith="foo")
```

### Using
Expand Down

0 comments on commit 883be04

Please sign in to comment.