17 lines
252 B
SQL
17 lines
252 B
SQL
-- name: CreateUser :one
|
|
INSERT INTO users (
|
|
email,
|
|
password,
|
|
fullname
|
|
) VALUES ($1, $2, $3)
|
|
RETURNING *;
|
|
|
|
-- name: GetPasswordByEmail :one
|
|
SELECT password
|
|
FROM users
|
|
WHERE email = $1;
|
|
|
|
-- name: GetUserById :one
|
|
SELECT *
|
|
FROM users
|
|
WHERE id = $1; |