Skip to content
This repository was archived by the owner on May 24, 2020. It is now read-only.

Latest commit

 

History

History
7 lines (6 loc) · 210 Bytes

7.count.md

File metadata and controls

7 lines (6 loc) · 210 Bytes

5.7.Count method usage

An ORM pointer struct is required for Count method in order to determine which table to retrieve from.

user := new(User)
total, err := engine.Where("id >?", 1).Count(user)