sqldb/sqlc: add NodeExists query

This commit is contained in:
Elle Mouton committed 2026-02-13 07:21:20 +02:00
1 parent 1738e0cabc
commit 5a3c013e91
3 files changed
+30

No files matched your search

+8
View File
@@ -59,6 +59,14 @@ FROM graph_nodes
WHERE pub_key = $1
AND version = $2;
-- name: NodeExists :one
SELECT EXISTS (
SELECT 1
FROM graph_nodes
WHERE pub_key = $1
AND version = $2
) AS node_exists;
-- name: GetNodeIDByPubKey :one
SELECT id
FROM graph_nodes