feat!: wip pronoun entry rework
This commit is contained in:
parent
68939f5e10
commit
7669595586
12 changed files with 1348 additions and 93 deletions
21
backend/db/queries/queries.user.sql
Normal file
21
backend/db/queries/queries.user.sql
Normal file
|
@ -0,0 +1,21 @@
|
|||
-- name: GetUserByID :one
|
||||
SELECT * FROM users WHERE id = pggen.arg('id');
|
||||
|
||||
-- name: GetUserByUsername :one
|
||||
SELECT * FROM users WHERE username = pggen.arg('username');
|
||||
|
||||
-- name: UpdateUserNamesPronouns :one
|
||||
UPDATE users SET
|
||||
names = pggen.arg('names'),
|
||||
pronouns = pggen.arg('pronouns')
|
||||
WHERE id = pggen.arg('id')
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetUserFields :many
|
||||
SELECT * FROM user_fields WHERE user_id = pggen.arg('user_id') ORDER BY id ASC;
|
||||
|
||||
-- name: InsertUserField :one
|
||||
INSERT INTO user_fields
|
||||
(user_id, name, entries) VALUES
|
||||
(pggen.arg('user_id'), pggen.arg('name'), pggen.arg('entries'))
|
||||
RETURNING *;
|
Loading…
Add table
Add a link
Reference in a new issue