naise_pos/db/query/users.sql

22 lines
321 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
2023-03-13 09:24:59 +07:00
WHERE email = $1;
2023-03-12 11:01:43 +07:00
-- name: GetUserById :one
SELECT *
FROM users
2023-03-14 17:39:40 +07:00
WHERE id = $1;
-- name: GetUserByEmail :one
SELECT *
FROM users
WHERE email = $1;