Add GetUsersQty function to retrieve the total number of users

This commit is contained in:
Luis Eduardo Jeréz Girón
2024-07-20 17:36:34 -06:00
parent b16142a509
commit 2f3fc13853
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
package users
import "context"
func (s *Service) GetUsersQty(ctx context.Context) (int64, error) {
return s.dbgen.UsersServiceGetUsersQty(ctx)
}

View File

@@ -0,0 +1,2 @@
-- name: UsersServiceGetUsersQty :one
SELECT COUNT(*) FROM users;