From 4bad2287cfd1fed687e187ac25829d19a79b1fd1 Mon Sep 17 00:00:00 2001 From: zhanghelong Date: Wed, 24 Jul 2019 12:54:13 +0800 Subject: [PATCH] document of FindAndCount() --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 2b839d52..62b40ba3 100644 --- a/README.md +++ b/README.md @@ -284,6 +284,13 @@ counts, err := engine.Count(&user) // SELECT count(*) AS total FROM user ``` +* `FindAndCount` combines function `Find` with `Count` which is usually used in query by page + +```Go +var users []User +counts, err := engine.FindAndCount(&users) +``` + * `Sum` sum functions ```Go