feat: 0.0.1
This commit is contained in:
146 files changed
+10444
No files matched your search
@@ -0,0 +1,25 @@
|
||||
-- name: CreateUser :one
|
||||
INSERT INTO users (
|
||||
username,
|
||||
hashed_password,
|
||||
full_name,
|
||||
email
|
||||
) VALUES (
|
||||
$1, $2, $3, $4
|
||||
)
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetUser :one
|
||||
SELECT * FROM users
|
||||
WHERE username = $1 LIMIT 1;
|
||||
|
||||
-- name: UpdateUser :one
|
||||
UPDATE users
|
||||
SET
|
||||
hashed_password = COALESCE(sqlc.narg('hashed_password'), hashed_password),
|
||||
password_changed_at = COALESCE(sqlc.narg('password_changed_at'), password_changed_at),
|
||||
full_name = COALESCE(sqlc.narg('full_name'), full_name),
|
||||
email = COALESCE(sqlc.narg('email'), email),
|
||||
is_email_verified = COALESCE(sqlc.narg('is_email_verified'), is_email_verified)
|
||||
WHERE username = sqlc.arg('username')
|
||||
RETURNING *;
|
||||
Reference in new issue
Block a user