Fork me on GitHub
#biff
<
2022-09-22
>
macrobartfast04:09:33

I’m consolidating the app features into the landing page (home.clj) so that the user will show as ‘logged in’ or as ‘guest’ in a navbar… does that technically make this a single page app? Is it already one?

macrobartfast04:09:51

Haha… fair enough. The lines blurred long ago, I suppose.

macrobartfast17:09:47

I’m not sure what I’m doing wrong, but when running

(def dbnode (:biff.xtdb/node @com.biffweb/system))

(map first
     (xt/q dbnode
           '{:find [email]
             :where [[user :user/email email]]}))
I’m getting
1. Unhandled java.lang.IllegalArgumentException
   No implementation of method: :q* of protocol:
   #'xtdb.api/PXtdbDatasource found for class: xtdb.node.XtdbNode

          core_deftype.clj:  583  clojure.core/-cache-protocol-fn
          core_deftype.clj:  575  clojure.core/-cache-protocol-fn
                   api.clj:  139  xtdb.api/eval7763/fn/G
                   api.clj:  366  xtdb.api/q
                   api.clj:  360  xtdb.api/q...

(dbnode evals to #<XtdbNode>)

Jacob O'Bryant17:09:23

You're passing a node to q when you should be passing a db. do this instead: (xt/q (xt/db dbnode) ...

macrobartfast17:09:10

badaboom. 😄