graph/db+sqldb: impl DisabledChannelIDs
Which lets us run `TestDisabledChannelIDs` against our SQL DB backends.
This commit is contained in:
6 files changed
+88
-1
No files matched your search
@@ -573,6 +573,19 @@ JOIN channel_policy_extra_types cpet
|
||||
ON cp.id = cpet.channel_policy_id
|
||||
WHERE cp.id = $1 OR cp.id = $2;
|
||||
|
||||
-- name: GetV1DisabledSCIDs :many
|
||||
SELECT c.scid
|
||||
FROM channels c
|
||||
JOIN channel_policies cp ON cp.channel_id = c.id
|
||||
-- NOTE: this is V1 specific since for V1, disabled is a
|
||||
-- simple, single boolean. The proposed V2 policy
|
||||
-- structure will have a more complex disabled bit vector
|
||||
-- and so the query for V2 may differ.
|
||||
WHERE cp.disabled = true
|
||||
AND c.version = 1
|
||||
GROUP BY c.scid
|
||||
HAVING COUNT(*) > 1;
|
||||
|
||||
-- name: DeleteChannelPolicyExtraTypes :exec
|
||||
DELETE FROM channel_policy_extra_types
|
||||
WHERE channel_policy_id = $1;
|
||||
|
||||
Reference in new issue
Block a user