File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33- Fixed infinite loop in parser on CLJS 1.9.456+ (#210 )
44- Added ` contains? ` to built-ins (#211 )
55- Fixed handling of false values in entity cache (PR #198 , thx [ Brandon Bloom] ( https://github.com/brandonbloom ) )
6+ - Fixed issue when string values were interpreted as lookup refs (#214 )
67
78# 0.15.5
89
Original file line number Diff line number Diff line change 7676 :1.9 { :dependencies [[org.clojure/clojure " 1.9.0-alpha15" :scope " provided" ]
7777 [org.clojure/clojurescript " 1.9.494" :scope " provided" ]]
7878 :global-vars { *print-namespace-maps* false } }
79- :dev { :source-paths [" bench/src" " test" " dev" ] }
79+ :dev { :source-paths [" bench/src" " test" " dev" ]
80+ :dependencies [[org.clojure/tools.nrepl " 0.2.12" ]] }
8081 }
8182
8283 :clean-targets ^{:protect false } [
Original file line number Diff line number Diff line change 302302 (if (and (not (nil? *lookup-attrs*))
303303 (contains? *lookup-attrs* attr))
304304 (fn [tuple]
305- (let [eid (#?(:cljs aget :clj get) tuple idx)]
306- (if (number? eid) ; ; quick path to avoid fn call
307- eid
308- (db/entid *lookup-source* eid))))
305+ (let [eid (#?(:cljs aget :clj get) tuple idx)]
306+ (cond
307+ (number? eid) eid ; ; quick path to avoid fn call
308+ (sequential? eid) (db/entid *lookup-source* eid)
309+ (da/array? eid) (db/entid *lookup-source* eid)
310+ :else eid)))
309311 (fn [tuple]
310312 (#?(:cljs aget :clj get) tuple idx)))))
311313
Original file line number Diff line number Diff line change 233233 [[:name " Ivan" ] [:name " Petr" ] [:name " Oleg" ]])
234234 #{[[:name " Ivan" ] [:name " Petr" ]]
235235 [[:name " Petr" ] [:name " Oleg" ]]}))
236+
237+ ; ; https://github.com/tonsky/datascript/issues/214
238+ (is (= (d/q '[:find ?e
239+ :in $ [?e ...]
240+ :where [?e :friend 3 ]]
241+ db [1 2 3 " A" ])
242+ #{[2 ]}))
236243
237244 (let [db2 (d/db-with (d/empty-db schema)
238245 [{:db/id 3 :name " Ivan" :id 3 }
You can’t perform that action at this time.
0 commit comments