-- name: GetUserByEmail :one
SELECT * FROM users WHERE email = $1 LIMIT 1;

-- name: GetUserByOryID :one
SELECT * FROM users WHERE ory_identity_id = $1 LIMIT 1;

-- name: CreateUser :one
INSERT INTO users (email, ory_identity_id) 
VALUES ($1, $2) 
RETURNING *;

-- name: UpdateUserOryID :one
UPDATE users 
SET ory_identity_id = $1 
WHERE email = $2 
RETURNING *;
