Fork me on GitHub

Hello all, I´m trying to use mount with yesql but I didn´t figure out how to reference the dynamic functions defined in defqueries, when I compile by uberjar is getting "java.lang.RuntimeException: Unable to resolve symbol: buscar-device-id in this context, compiling:(*/session.clj:17:18)" I start it by

(defn iniciar [config]
  (log/debug "Ativando queries para acesso ao banco de dados")
  (sql/defqueries "sql/operacoes.sql" {:connection (:database config)}))

(defstate db
  :start (iniciar config))
how to use in other "component" the inside .sql function?


I doubt Unable to resolve symbol: buscar-device-id error is due to either mount or yesql.. looks like misconfiguration. having said that I am not a big fan of defqueries since it just magically binds vars that you can really reload cleanly (i.e. when restarting states / components) I would recommend two things: * don't use yesql, use something better: like hugsql: * steal make-queries from my yesql pull request and use that instead of defqueries: (`make-queries` just returns you a map of named queries without binding these names to anything)


but Hugsql has Oracle database connection?


> HugSQL defaults to using the library to run underlying database commands which is just JDBC, so your Oracle JDBC driver would work