go-project-template/db/queries/users.sql
Finn 4ebe6c7752 add auth
and some other improvements
2024-07-24 22:13:23 -07:00

8 lines
234 B
SQL

-- name: GetUser :one
SELECT * FROM users WHERE id = $1 LIMIT 1;
-- name: GetUserByIDP :one
SELECT * FROM users WHERE idp_sub = $1 LIMIT 1;
-- name: CreateUser :one
INSERT INTO users (username, idp_sub) VALUES ($1, $2) RETURNING *;