graph/db+sqldb: add HighestChanID to SQLStore

This commit is contained in:
Elle Mouton
2025-05-24 15:21:56 +02:00
parent d93d104a66
commit cf542458bd
5 changed files with 54 additions and 1 deletions

View File

@@ -153,6 +153,13 @@ RETURNING id;
SELECT * FROM channels
WHERE scid = $1 AND version = $2;
-- name: HighestSCID :one
SELECT scid
FROM channels
WHERE version = $1
ORDER BY scid DESC
LIMIT 1;
/* ─────────────────────────────────────────────
channel_features table queries
─────────────────────────────────────────────