hiling_go/db/queries/users.sql

18 lines
281 B
MySQL
Raw Permalink Normal View History

2023-09-12 17:07:03 +07:00
-- name: CreateUser :one
2023-09-08 22:24:58 +07:00
INSERT INTO users (
2023-09-12 17:07:03 +07:00
username,
password
) VALUES ($1, $2)
RETURNING *;
-- name: UpdatePassword :exec
UPDATE users
SET password = $1
WHERE id = $2;
2023-10-09 16:25:39 +07:00
-- name: UpdateAvatar :one
UPDATE users
SET avatar_picture = $1
WHERE id = $2
RETURNING avatar_picture;