mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-05-19 19:39:01 -05:00
Add qty functions to services
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package backups
|
||||
|
||||
import "context"
|
||||
|
||||
func (s *Service) GetBackupsQty(ctx context.Context) (int64, error) {
|
||||
return s.dbgen.BackupsServiceGetBackupsQty(ctx)
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
-- name: BackupsServiceGetBackupsQty :one
|
||||
SELECT COUNT(*) FROM backups;
|
||||
@@ -0,0 +1,7 @@
|
||||
package databases
|
||||
|
||||
import "context"
|
||||
|
||||
func (s *Service) GetDatabasesQty(ctx context.Context) (int64, error) {
|
||||
return s.dbgen.DatabasesServiceGetDatabasesQty(ctx)
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
-- name: DatabasesServiceGetDatabasesQty :one
|
||||
SELECT COUNT(*) FROM databases;
|
||||
@@ -0,0 +1,7 @@
|
||||
package destinations
|
||||
|
||||
import "context"
|
||||
|
||||
func (s *Service) GetDestinationsQty(ctx context.Context) (int64, error) {
|
||||
return s.dbgen.DestinationsServiceGetDestinationsQty(ctx)
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
-- name: DestinationsServiceGetDestinationsQty :one
|
||||
SELECT COUNT(*) FROM destinations;
|
||||
@@ -0,0 +1,7 @@
|
||||
package executions
|
||||
|
||||
import "context"
|
||||
|
||||
func (s *Service) GetExecutionsQty(ctx context.Context) (int64, error) {
|
||||
return s.dbgen.ExecutionsServiceGetExecutionsQty(ctx)
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
-- name: ExecutionsServiceGetExecutionsQty :one
|
||||
SELECT COUNT(*) FROM executions;
|
||||
Reference in New Issue
Block a user