Browse Source

document of FindAndCount()

xormplus 6 years ago
parent
commit
80b0b9cef7
1 changed files with 7 additions and 0 deletions
  1. 7 0
      README.md

+ 7 - 0
README.md

@@ -1175,6 +1175,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)
+```
+
 * 条件编辑器
 
 ```Go