소스 검색

document of FindAndCount()

xormplus 6 년 전
부모
커밋
80b0b9cef7
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  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