document of FindAndCount() (#1365)

This commit is contained in:
BetaCat 2019-07-24 13:02:59 +08:00 committed by Lunny Xiao
parent 18b32486cf
commit 9b08f9494f
1 changed files with 7 additions and 0 deletions

View File

@ -284,6 +284,13 @@ counts, err := engine.Count(&user)
// SELECT count(*) AS total FROM 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 * `Sum` sum functions
```Go ```Go