naise_pos/db/query/users.sql

19 lines
283 B
MySQL
Raw Normal View History

2023-03-12 11:01:43 +07:00
-- name: CreateUser :one
INSERT INTO users (
email,
password,
fullname
) VALUES ($1, $2, $3)
RETURNING *;
-- name: GetPasswordByEmail :one
SELECT password
FROM users
WHERE email = $1
RETURNING password;
-- name: GetUserById :one
SELECT *
FROM users
WHERE id = $1
RETURNING *;