mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-09 15:04:39 +02:00
sqldb+graph/db: implement SQLStore.NodeUpdatesInHorizon
In this commit we add the necessary SQL queries and then implement the SQLStore's NodeUpdatesInHorizon method. This lets us run the TestNodeUpdatesInHorizon unit tests against SQL backends.
This commit is contained in:
@ -82,6 +82,12 @@ LEFT JOIN node_addresses a ON a.node_id = n.id
|
||||
WHERE n.pub_key = $1 AND n.version = $2
|
||||
ORDER BY a.type ASC, a.position ASC;
|
||||
|
||||
-- name: GetNodesByLastUpdateRange :many
|
||||
SELECT *
|
||||
FROM nodes
|
||||
WHERE last_update >= @start_time
|
||||
AND last_update < @end_time;
|
||||
|
||||
-- name: DeleteNodeAddresses :exec
|
||||
DELETE FROM node_addresses
|
||||
WHERE node_id = $1;
|
||||
|
Reference in New Issue
Block a user