Skip to content

Commit f9f6e1b

Browse files
db: add List All Kv Records query
During the upcoming upcoming migration of the firewall database to SQL, we need to be able to check all kvstores records in the SQL database, to validate that the migration is successful in tests. This commits adds a query to list all kvstores records, which enables that functionality.
1 parent f9d48df commit f9f6e1b

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

db/sqlc/kvstores.sql.go

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/sqlc/querier.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/sqlc/queries/kvstores.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ VALUES ($1, $2, $3, $4, $5, $6);
2828
DELETE FROM kvstores
2929
WHERE perm = false;
3030

31+
-- name: ListAllKVStoresRecords :many
32+
SELECT *
33+
FROM kvstores;
34+
3135
-- name: GetGlobalKVStoreRecord :one
3236
SELECT value
3337
FROM kvstores

0 commit comments

Comments
 (0)