File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 129129 (is (= 2 (count
130130 (filter (fn [[e a v]]
131131 (and (= e v) (nodes e) (= :db/ident a)))
132- data))))))
132+ data)))))
133+ (let [rx [(r " multi-prop" [?z :first :a ] [?z :second ?y] :- [?x :foo ?y])]
134+ ax [[:data :foo :bar ] [:other :foo :baz ]]
135+ program (r/create-program rx ax)
136+ [store results] (e/run {:type :memory } program)
137+ data' (store/resolve-pattern store '[?e ?a ?v])
138+ data (remove #(#{[:data :foo :bar ] [:other :foo :baz ]} %) data')
139+ nodes (set (map first data))]
140+ (is (= 6 (count data)))
141+ (is (= 2 (count nodes)))
142+ (is (= 2 (count (filter (fn [[e a v]] (and (nodes e) (= [:first :a ] [a v]))) data))))
143+ (is (= 1 (count (filter (fn [[e a v]] (and (nodes e) (= [:second :bar ] [a v]))) data))))
144+ (is (= 1 (count (filter (fn [[e a v]] (and (nodes e) (= [:second :baz ] [a v]))) data))))
145+ (is (= 2 (count (filter (fn [[e a v]] (and (nodes e) (= e v) (= :db/ident a))) data))))))
133146
134147; ; todo blank-multi-prop
135148
You can’t perform that action at this time.
0 commit comments