From 7f11aa00673b0f77523db44969699c54289ace5b Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 25 Jul 2021 21:53:59 +0200 Subject: app: working web prototype --- sql/queries.sql | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/queries.sql b/sql/queries.sql index 066781f..3cc8342 100644 --- a/sql/queries.sql +++ b/sql/queries.sql @@ -3,10 +3,17 @@ -- Licence: EUPL-1.2 --- Fetch a user account by its username. +-- Fetch a user account by its ID. -- -- :name fetch_account -- :result :one-or-none +select * from accounts where id = :user_id; + + +-- Fetch a user account by its username. +-- +-- :name fetch_account_username +-- :result :one-or-none select * from accounts where username = :username; -- cgit v1.2.3