开发...

This commit is contained in:
kenneth
2023-11-29 09:46:09 +00:00
parent 6b8eafe5f5
commit d07d13151a
31 changed files with 920 additions and 665 deletions

View File

@@ -1,8 +1,8 @@
-- name: CreateUser :one
INSERT INTO users (
username, hashed_password, email
id, username, hashed_password, email
) VALUES (
$1, $2, $3
$1, $2, $3, $4
)
RETURNING *;
@@ -25,6 +25,10 @@ WHERE id = $1 LIMIT 1;
SELECT * FROM users
WHERE username = $1 LIMIT 1;
-- name: GetUserByEmail :one
SELECT * FROM users
WHERE email = $1 LIMIT 1;
-- name: ListUsers :many
SELECT * FROM users
ORDER BY id