From 546b7ae53c3d9283617f3834b1c1bb3e226852a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20M=C3=A1rton?= Date: Sun, 5 Jan 2020 12:50:51 +0100 Subject: [PATCH] Fix whete typo (#59) --- doc/query.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 +```