diff --git a/doc/query.md b/doc/query.md index ffb8d0c..c78ea4a 100644 --- a/doc/query.md +++ b/doc/query.md @@ -14,7 +14,7 @@ Now, _result_ contains **QList\\>** 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(); -``` \ No newline at end of file +```