Files
phylum/server/sql/queries/users.sql
2024-08-06 00:14:51 +05:30

15 lines
314 B
SQL

-- name: CreateUser :exec
INSERT INTO users(
username, display_name, password_hash
) VALUES (
$1, $2, $3
);
-- name: UserByUsername :one
SELECT * from users WHERE username = $1;
-- name: UserByID :one
SELECT * from users WHERE id = $1;
-- name: ListUsers :many
SELECT * from users WHERE deleted IS NULL;