sqldb: add channel data batch queries
Also add the calling logic for these queries. This logic is not yet used.
This commit is contained in:
4 files changed
+326
No files matched your search
@@ -647,6 +647,14 @@ INSERT INTO graph_channel_features (
|
||||
$1, $2
|
||||
);
|
||||
|
||||
-- name: GetChannelFeaturesBatch :many
|
||||
SELECT
|
||||
channel_id,
|
||||
feature_bit
|
||||
FROM graph_channel_features
|
||||
WHERE channel_id IN (sqlc.slice('chan_ids')/*SLICE:chan_ids*/)
|
||||
ORDER BY channel_id, feature_bit;
|
||||
|
||||
/* ─────────────────────────────────────────────
|
||||
graph_channel_extra_types table queries
|
||||
─────────────────────────────────────────────
|
||||
@@ -658,6 +666,15 @@ INSERT INTO graph_channel_extra_types (
|
||||
)
|
||||
VALUES ($1, $2, $3);
|
||||
|
||||
-- name: GetChannelExtrasBatch :many
|
||||
SELECT
|
||||
channel_id,
|
||||
type,
|
||||
value
|
||||
FROM graph_channel_extra_types
|
||||
WHERE channel_id IN (sqlc.slice('chan_ids')/*SLICE:chan_ids*/)
|
||||
ORDER BY channel_id, type;
|
||||
|
||||
/* ─────────────────────────────────────────────
|
||||
graph_channel_policies table queries
|
||||
─────────────────────────────────────────────
|
||||
@@ -760,6 +777,15 @@ INSERT INTO graph_channel_policy_extra_types (
|
||||
)
|
||||
VALUES ($1, $2, $3);
|
||||
|
||||
-- name: GetChannelPolicyExtraTypesBatch :many
|
||||
SELECT
|
||||
channel_policy_id as policy_id,
|
||||
type,
|
||||
value
|
||||
FROM graph_channel_policy_extra_types
|
||||
WHERE channel_policy_id IN (sqlc.slice('policy_ids')/*SLICE:policy_ids*/)
|
||||
ORDER BY channel_policy_id, type;
|
||||
|
||||
-- name: GetChannelPolicyExtraTypes :many
|
||||
SELECT
|
||||
cp.id AS policy_id,
|
||||
|
||||
Reference in new issue
Block a user