-- Users --------------------------------------------------------------------------- -- :name create-user! :! :n -- :doc creates a new user record INSERT INTO users (id, login, name, email, token, address, created) SELECT :id, :login, :name, :email, :token, :address, :created WHERE NOT exists(SELECT 1 FROM users WHERE id = :id); -- :name update-user! :! :n -- :doc updates an existing user record UPDATE users SET login = :login, name = :name, email = :email, token = :token, address = :address WHERE id = :id; -- :name update-user-token! :