summaryrefslogtreecommitdiff
path: root/query
diff options
context:
space:
mode:
Diffstat (limited to 'query')
-rw-r--r--query/trusted_and_blocked_users.sql15
1 files changed, 14 insertions, 1 deletions
diff --git a/query/trusted_and_blocked_users.sql b/query/trusted_and_blocked_users.sql
index f91e616..a06cd55 100644
--- a/query/trusted_and_blocked_users.sql
+++ b/query/trusted_and_blocked_users.sql
@@ -1,4 +1,4 @@
--- name: GetUserTrusteds :many
+-- name: GetTrustedUsers :many
SELECT trusted_user_id, trusted_public_key FROM trusted_users
WHERE trusting_user_id = ?;
@@ -14,3 +14,16 @@ INSERT OR IGNORE INTO trusted_users (
-- name: UntrustUser :exec
DELETE FROM trusted_users
WHERE trusting_user_id = ? AND trusted_user_id = ?;
+
+-- name: GetBlockedUsers :many
+SELECT blocked_user_id FROM blocked_users
+WHERE blocking_user_id = ?;
+
+-- name: BlockUser :exec
+INSERT OR IGNORE INTO blocked_users (
+ blocking_user_id, blocking_user_id
+) VALUES (?, ?);
+
+-- name: UnblockUser :exec
+DELETE FROM blocked_users
+WHERE blocking_user_id = ? AND blocked_user_id = ?;