summaryrefslogtreecommitdiff
path: root/query
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-02-10 19:01:30 +0200
committerKyren223 <Kyren223@proton.me>2025-02-10 19:01:30 +0200
commitc0e615133ceee47c0d1c42139e267f3a54e84b2b (patch)
tree01bf277f7d914f21c6087ffc43417c1c90d1ea1f /query
parent6c54b5fe62d56eca0deca1fa4c660d0f16df1aa6 (diff)
Renamed instances of "trusteds" to "trusted users" to be grammatically
correct
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 = ?;