Fork me on GitHub
Brandon Olivier05:09:56

Can anybody explain this line from the template to me?

(binding [*ns* 'app.db.core]
    (conman/bind-connection app.db.core/*db* "sql/queries.sql"))

Brandon Olivier05:09:48

After adding clojure expressions to queries.sql, this line causes an NullPointerException

Brandon Olivier05:09:15

More specifically, ERROR: Unhandled REPL handler exception processing message {:nrepl.middleware.print/stream? 1, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/options {:right-margin 80}, :op stacktrace, :session 8515eaed-32ac-4adf-961a-697af5d1d3fd, :id 236}


@brandon149 the line above binds the db connection to the hugsql queries

Brandon Olivier15:09:06

@jmayaalv what's the deal with binding? I read the docs, but I didn't really understand it