hiling_go/db/queries/users.sql
2024-05-22 11:26:15 +07:00

18 lines
281 B
SQL
Executable File

-- 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;