✏️ Fix small typos in docs (#481)
Fix small typos Fixing small typos here and there while reading the document. Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
parent
3a9244c69f
commit
22faa192b9
@ -311,7 +311,7 @@ Instead, it results in a special type of object. If you tried that in an interac
|
|||||||
<sqlalchemy.sql.elements.BinaryExpression object at 0x7f4aec0d6c90>
|
<sqlalchemy.sql.elements.BinaryExpression object at 0x7f4aec0d6c90>
|
||||||
```
|
```
|
||||||
|
|
||||||
So, that result value is an **expession** object. 💡
|
So, that result value is an **expression** object. 💡
|
||||||
|
|
||||||
And `.where()` takes one (or more) of these **expression** objects to update the SQL statement.
|
And `.where()` takes one (or more) of these **expression** objects to update the SQL statement.
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ Of course, the keyword arguments would have been a bit shorter.
|
|||||||
|
|
||||||
But with the **expressions** your editor can help you a lot with autocompletion and inline error checks. ✨
|
But with the **expressions** your editor can help you a lot with autocompletion and inline error checks. ✨
|
||||||
|
|
||||||
Let me give you an example. Let's imagine that keword arguments were supported in SQLModel and you wanted to filter using the secret identity of Spider-Boy.
|
Let me give you an example. Let's imagine that keyword arguments were supported in SQLModel and you wanted to filter using the secret identity of Spider-Boy.
|
||||||
|
|
||||||
You could write:
|
You could write:
|
||||||
|
|
||||||
@ -436,7 +436,7 @@ Maybe your code could even run and seem like it's all fine, and then some months
|
|||||||
|
|
||||||
And maybe finally you would realize that we wrote the code using `secret_identity` which is not a column in the table. We should have written `secret_name` instead.
|
And maybe finally you would realize that we wrote the code using `secret_identity` which is not a column in the table. We should have written `secret_name` instead.
|
||||||
|
|
||||||
Now, with the the expressions, your editor would show you an error right away if you tried this:
|
Now, with the expressions, your editor would show you an error right away if you tried this:
|
||||||
|
|
||||||
```Python
|
```Python
|
||||||
# Expression ✨
|
# Expression ✨
|
||||||
@ -694,7 +694,7 @@ age=35 id=5 name='Black Lion' secret_name='Trevor Challa'
|
|||||||
!!! tip
|
!!! tip
|
||||||
We get `Black Lion` here too because although the age is not *strictly* less than `35` it is *equal* to `35`.
|
We get `Black Lion` here too because although the age is not *strictly* less than `35` it is *equal* to `35`.
|
||||||
|
|
||||||
### Benefits of Expresions
|
### Benefits of Expressions
|
||||||
|
|
||||||
Here's a good moment to see that being able to use these pure Python expressions instead of keyword arguments can help a lot. ✨
|
Here's a good moment to see that being able to use these pure Python expressions instead of keyword arguments can help a lot. ✨
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user