[server][core] Inline some publink queries

This commit is contained in:
Abhishek Shroff
2025-03-31 00:44:02 +05:30
parent 34f67627a9
commit cd30f0d46c
3 changed files with 22 additions and 76 deletions

View File

@@ -1,6 +1,3 @@
-- name: GetPublink :one
SELECT * FROM publinks p WHERE name = @name::text AND deleted IS NULL;
-- name: MarkPublinkAccess :exec
UPDATE publinks SET accessed = accessed + 1 WHERE id = $1;
@@ -12,7 +9,4 @@ INSERT INTO publinks(name, created_by, root, password_hash, expires, max_accesse
@password_hash::text,
sqlc.narg('expires')::timestamp,
@max_accesses::int
);
-- name: PublinksByCreator :many
SELECT * FROM publinks WHERE created_by = @username::text;
);