mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-01-18 18:29:31 -06:00
Add GetUsersQty function to retrieve the total number of users
This commit is contained in:
7
internal/service/users/get_users_qty.go
Normal file
7
internal/service/users/get_users_qty.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package users
|
||||
|
||||
import "context"
|
||||
|
||||
func (s *Service) GetUsersQty(ctx context.Context) (int64, error) {
|
||||
return s.dbgen.UsersServiceGetUsersQty(ctx)
|
||||
}
|
||||
2
internal/service/users/get_users_qty.sql
Normal file
2
internal/service/users/get_users_qty.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- name: UsersServiceGetUsersQty :one
|
||||
SELECT COUNT(*) FROM users;
|
||||
Reference in New Issue
Block a user