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