This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-03
Channels
- # admin-announcements (2)
- # alda (4)
- # beginners (15)
- # boot (89)
- # cljs-dev (88)
- # cljsrn (75)
- # clojure (149)
- # clojure-belgium (16)
- # clojure-france (2)
- # clojure-greece (6)
- # clojure-russia (108)
- # clojure-spec (39)
- # clojure-taiwan (3)
- # clojure-uk (7)
- # clojurescript (70)
- # css (3)
- # cursive (17)
- # data-science (2)
- # datascript (7)
- # datomic (41)
- # dirac (3)
- # hoplon (12)
- # instaparse (1)
- # juxt (3)
- # lambdaisland (9)
- # mount (4)
- # off-topic (6)
- # om (71)
- # om-next (4)
- # onyx (22)
- # other-languages (56)
- # perun (15)
- # proton (6)
- # re-frame (32)
- # reagent (42)
- # specter (34)
- # spirituality-ethics (7)
- # tmp-json-parsing (5)
- # untangled (13)
- # vim (4)
- # yada (6)
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
: 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)