I’m on p. 219, and previously I think everything was working.
I updated queries.sql as shown in the book and source code: (two - - are shown as – here for some reason, but there’s 2 dashes in my code. Similarly, I wrote a space with * db* otherwise it shows up as italics, but this space isn’t there when I write it in the terminal).
– START:profile
– :name set-profile-for-user* :<! :1
– :doc sets a profile map for the specified user
UPDATE users
SET profile = :profile
where :login = login
RETURNING *;
– :name get-user* :? :1
– :doc gets a user’s publicly available information
SELECT login, created_at, profile from users
WHERE login = :login
– END:profile
Then I do
user=> (start)
(require 'guestbook.db.core)
(in-ns 'guestbook.db.core)
(conman/bind-connection * db* “sql/queries.sql”)
(get-user* {:login “testuser”})
Then I get this error:
ERROR: column “profile” does not exist
Position: 27
What do I do?
Edit: I’d like to add I get this same error when trying to run the source code for this section. This leads me to believe I have something wrong in how my database is set up or being accessed. I’m new to all this so that is my best guess.