luminus

Brandon Olivier 2019-09-18T05:39:56.000600Z

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 Olivier 2019-09-18T05:40:48.001200Z

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

Brandon Olivier 2019-09-18T05:41:15.001300Z

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}

2019-09-18T15:29:29.002100Z

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

Brandon Olivier 2019-09-18T15:30:06.002500Z

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