yenu/resources/sql/queries.sql
Aaron Fischer c2d1dd3227 Time to start over
+cljs +sqlite +sassc +reagent
2017-02-16 22:31:16 +01:00

21 lines
534 B
SQL

-- :name create-user! :! :n
-- :doc creates a new user record
INSERT INTO users
(id, first_name, last_name, email, pass)
VALUES (:id, :first_name, :last_name, :email, :pass)
-- :name update-user! :! :n
-- :doc update an existing user record
UPDATE users
SET first_name = :first_name, last_name = :last_name, email = :email
WHERE id = :id
-- :name get-user :? :1
-- :doc retrieve a user given the id.
SELECT * FROM users
WHERE id = :id
-- :name delete-user! :! :n
-- :doc delete a user given the id
DELETE FROM users
WHERE id = :id