mount

fabrao 2016-06-03T02:31:24.000771Z

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?

tolitius 2016-06-03T03:22:29.000775Z

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: https://github.com/layerware/hugsql * steal make-queries from my yesql pull request and use that instead of defqueries: https://github.com/krisajenkins/yesql/pull/117 (`make-queries` just returns you a map of named queries without binding these names to anything)

fabrao 2016-06-03T04:06:30.000778Z

but Hugsql has Oracle database connection?

tolitius 2016-06-03T13:45:19.000784Z

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