According to line 54 of the 'geting-started.clj' file which ships with Datomic (under samples/seattle) I should be able to use the pull function inside a query like so:
(def pull-results (q '[:find (pull ?c [*]) :where [?c :community/name]] (db conn))) However, in my code below I get an error: IllegalArgumentException Argument [*] in :find is not a variable datomic.query/validate-query (query.clj:315)
(defn get-tag [] (d/q '[:find (d/pull ?e [*]) :where [?e :tag.tag/term]] (db conn))) Now, to my eyes these two are similarly constructed. Coupled with the fact that the pull function api as read from http://docs.datomic.com/clojure/#datomic.api/pull appears to be:
(pull db pattern eid) I would say that the API has changed since the Seattle code was written. Am I correct? If not, what is going on here. Thanks
d/fromd/pullis my guess. It's syntax in this case.