@@ -53,15 +53,15 @@ notes = await Note.objects.filter(completed=True).all()
53
53
54
54
There are some special operators defined automatically on every column:
55
55
56
- - ` in ` - SQL ` IN ` operator.
57
- - ` exact ` - filter instances matching exact value.
58
- - ` iexact ` - same as ` exact ` but case-insensitive.
59
- - ` contains ` - filter instances containing value.
60
- - ` icontains ` - same as ` contains ` but case-insensitive.
61
- - ` lt ` - filter instances having value ` Less Than ` .
62
- - ` lte ` - filter instances having value ` Less Than Equal ` .
63
- - ` gt ` - filter instances having value ` Greater Than ` .
64
- - ` gte ` - filter instances having value ` Greater Than Equal ` .
56
+ * ` in ` - SQL ` IN ` operator.
57
+ * ` exact ` - filter instances matching exact value.
58
+ * ` iexact ` - same as ` exact ` but case-insensitive.
59
+ * ` contains ` - filter instances containing value.
60
+ * ` icontains ` - same as ` contains ` but case-insensitive.
61
+ * ` lt ` - filter instances having value ` Less Than ` .
62
+ * ` lte ` - filter instances having value ` Less Than Equal ` .
63
+ * ` gt ` - filter instances having value ` Greater Than ` .
64
+ * ` gte ` - filter instances having value ` Greater Than Equal ` .
65
65
66
66
Example usage:
67
67
@@ -84,7 +84,7 @@ notes = await Note.objects.filter(Note.columns.id.in_([1, 2, 3])).all()
84
84
Here ` Note.columns ` refers to the columns of the underlying SQLAlchemy table.
85
85
86
86
!!! note
87
- Note that ` Note.columns ` returns SQLAlchemy table columns, whereas ` Note.fields ` returns ` orm ` fields.
87
+ Note that ` Note.columns ` returns SQLAlchemy table columns, whereas ` Note.fields ` returns ` orm ` fields.
88
88
89
89
### .limit()
90
90
@@ -119,7 +119,7 @@ notes = await Note.objects.order_by("text", "-id").all()
119
119
```
120
120
121
121
!!! note
122
- This will sort by ascending ` text ` and descending ` id ` .
122
+ This will sort by ascending ` text ` and descending ` id ` .
123
123
124
124
## Returning results
125
125
@@ -209,7 +209,7 @@ note = await Note.objects.get(id=1)
209
209
```
210
210
211
211
!!! note
212
- ` .get() ` expects to find only one instance. This can raise ` NoMatch ` or ` MultipleMatches ` .
212
+ ` .get() ` expects to find only one instance. This can raise ` NoMatch ` or ` MultipleMatches ` .
213
213
214
214
### .update()
215
215
@@ -262,7 +262,7 @@ This will query a `Note` with `text` as `"Going to car wash"`,
262
262
if it doesn't exist, it will use ` defaults ` argument to create the new instance.
263
263
264
264
!!! note
265
- Since ` get_or_create() ` is doing a [ get()] ( #get ) , it can raise ` MultipleMatches ` exception.
265
+ Since ` get_or_create() ` is doing a [ get()] ( #get ) , it can raise ` MultipleMatches ` exception.
266
266
267
267
### .update_or_create()
268
268
@@ -280,4 +280,4 @@ if an instance is found, it will use the `defaults` argument to update the insta
280
280
If it matches no records, it will use the comibnation of arguments to create the new instance.
281
281
282
282
!!! note
283
- Since ` update_or_create() ` is doing a [ get()] ( #get ) , it can raise ` MultipleMatches ` exception.
283
+ Since ` update_or_create() ` is doing a [ get()] ( #get ) , it can raise ` MultipleMatches ` exception.
0 commit comments