aboutsummaryrefslogtreecommitdiff
path: root/sql/queries.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/queries.sql')
-rw-r--r--sql/queries.sql9
1 files changed, 8 insertions, 1 deletions
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 @@
3-- Licence: EUPL-1.2 3-- Licence: EUPL-1.2
4 4
5 5
6-- Fetch a user account by its username. 6-- Fetch a user account by its ID.
7-- 7--
8-- :name fetch_account 8-- :name fetch_account
9-- :result :one-or-none 9-- :result :one-or-none
10select * from accounts where id = :user_id;
11
12
13-- Fetch a user account by its username.
14--
15-- :name fetch_account_username
16-- :result :one-or-none
10select * from accounts where username = :username; 17select * from accounts where username = :username;
11 18
12 19