mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-01-26 06:29:03 -06:00
11 lines
323 B
SQL
11 lines
323 B
SQL
-- name: DatabasesServicePaginateDatabasesCount :one
|
|
SELECT COUNT(*) FROM databases;
|
|
|
|
-- name: DatabasesServicePaginateDatabases :many
|
|
SELECT
|
|
*,
|
|
pgp_sym_decrypt(connection_string, @encryption_key) AS decrypted_connection_string
|
|
FROM databases
|
|
ORDER BY created_at DESC
|
|
LIMIT sqlc.arg('limit') OFFSET sqlc.arg('offset');
|