Fork me on GitHub
#luminus
<
2020-01-13
>
sudakatux13:01:54

Im having some trouble in generating the insert statments

sudakatux13:01:11

Ive followed the book Web development in Clojure

sudakatux13:01:20

and everything seems to work

sudakatux13:01:48

however when i try to use insert or update statments the namespace is no longer usable

sudakatux13:01:19

-- :name create-user!* :! :n
-- :doc creates a new user record
INSERT INTO users
(first_name, last_name, email)
VALUES (:first_name, :last_name, :email)

-- :name get-user-for-auth* :? :1
-- :doc selects a user for authentication
SELECT * FROM users
WHERE email = :email

sudakatux13:01:38

if i comment out the first one

sudakatux13:01:54

i can call db/get-user-for-auth*

sudakatux13:01:15

if i leave it as is

sudakatux13:01:24

then i get :

sudakatux13:01:28

Syntax error compiling at (auth.clj:17:31).
No such var: db/create-user!*

sudakatux13:01:47

when syncing files with the repl

sudakatux13:01:05

I tried with a normal update statement and it doesnt work either.

sudakatux13:01:47

seems to be a problem with INSERT or UPDATE. I cant tell

sudakatux13:01:43

Im using the same version template as in the book

sudakatux14:01:02

I just went to the db workspace

sudakatux14:01:37

and re-runned (conman/bind-connection