193 user exists query added

This commit is contained in:
Ivan Grishaev 2018-02-06 17:09:08 +03:00
parent 085e8ef844
commit 07bb457dfa
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,12 @@ WHERE NOT exists(SELECT 1
WHERE id = :id)
RETURNING id, login, name, email, avatar_url, address, created;
-- :name user-exists? :? :1
-- :doc Checks where a user exists in the database.
select 1
from users u
where u.id = :id;
-- :name update-user! :! :n
-- :doc updates an existing user record
UPDATE users