mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-02-05 19:18:59 -06:00
[server][core] Inline some publink queries
This commit is contained in:
@@ -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;
|
||||
);
|
||||
Reference in New Issue
Block a user