18 lines
281 B
SQL
18 lines
281 B
SQL
-- name: CreateUser :one
|
|
INSERT INTO users (
|
|
username,
|
|
password
|
|
) VALUES ($1, $2)
|
|
RETURNING *;
|
|
|
|
-- name: UpdatePassword :exec
|
|
UPDATE users
|
|
SET password = $1
|
|
WHERE id = $2;
|
|
|
|
-- name: UpdateAvatar :one
|
|
UPDATE users
|
|
SET avatar_picture = $1
|
|
WHERE id = $2
|
|
RETURNING avatar_picture;
|