taskcafe/api/query/user_accounts.sql

14 lines
403 B
MySQL
Raw Normal View History

2020-04-10 04:40:22 +02:00
-- name: GetUserAccountByID :one
SELECT * FROM user_account WHERE user_id = $1;
-- name: GetAllUserAccounts :many
SELECT * FROM user_account;
-- name: GetUserAccountByUsername :one
SELECT * FROM user_account WHERE username = $1;
-- name: CreateUserAccount :one
2020-04-20 05:02:55 +02:00
INSERT INTO user_account(first_name, last_name, email, username, created_at, password_hash)
VALUES ($1, $2, $3, $4, $5, $6)
2020-04-10 04:40:22 +02:00
RETURNING *;