sqldb/sqlc: add NodeExists query
This commit is contained in:
3 files changed
+30
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user