【发布时间】:2015-07-12 23:45:45
【问题描述】:
我在搞清楚 pull API 时遇到了一些麻烦。我有两个位置实体。当我使用pull 时,我只收到一个。
(ns some-ns.core
(:require [datomic.api :as d]))
(d/q '[:find ?e
:where [?e :location/name]]
db)
=> #{[17592186045535] [17592186045420]} ; two results
(d/q '[:find [(pull ?e [:db/id
:location/name])]
:where [?e :location/name]]
db)
=> [{:db/id 17592186045535, :location/name "Some Other Location"}] ; one result
我怀疑我可能使用了不正确的 pull 表达式,但我没有发现明显的错误。
【问题讨论】: