Skip to content

Commit 96b91c2

Browse files
committed
Add a test for a query that produces a nil :db/id
1 parent da2fb70 commit 96b91c2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/datascript/test/query_or.cljc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@
6565
(and [2 :age ?a]
6666
[?e :name "Oleg"]))
6767
[?e :age ?a]]
68-
#{1 5 4}))
68+
#{1 5 4}
69+
70+
[[?top :name "Ivan"]
71+
[?top :age 10]
72+
[(or ?e ?top)]]
73+
#{}))
6974

7075
(deftest test-or-join
7176
(are [q res] (= (d/q (concat '[:find ?e :where] (quote q)) @test-db)
@@ -157,4 +162,4 @@
157162
(d/q '[:find ?e
158163
:where (or-join [[?e]]
159164
[?e :name "Ivan"])]
160-
@test-db))))
165+
@test-db))))

0 commit comments

Comments
 (0)