Fix whete typo (#59)

This commit is contained in:
Miklós Márton 2020-01-05 12:50:51 +01:00 committed by Hamed Masafi
parent d42e1b3f5c
commit 546b7ae53c
1 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ Now, _result_ contains **QList\<QSharedPointer\<Post\>\>** and can be used in co
## Getting first record in query
```cpp
auto post = db.posts().query()
->setWhete(Post::idField() == 1)
->setWhere(Post::idField() == 1)
->first();
if(post)
@ -26,14 +26,14 @@ else
## Sorting result
```cpp
auto posts = db.posts().query()
->whete(Post::idField() == 1)
->where(Post::idField() == 1)
->orderBy(Post::idField())
->toList();
```
Also you can sort descending by adding **!** to field name
```cpp
auto posts = db.posts().query()
->whete(Post::idField() == 1)
->where(Post::idField() == 1)
->orderBy(!Post::idField())
->toList();
```
@ -64,4 +64,4 @@ Or
auto post = db.posts().query()
->where(Post::idField().in({1, 2, 3, 4}) || Post::isAccepted())
->first();
```
```