datascript icon indicating copy to clipboard operation
datascript copied to clipboard

Recursive wildcard does not recurse

Open timothypratley opened this issue 8 years ago • 5 comments

Using the example from the Day of Datomic pull_recursion.clj: (d/pull (d/db conn) '["*" {:person/friend 2}] anne-id)

Works with latest Datomic, but not in Datascript. http://stackoverflow.com/questions/38092197/how-best-can-i-query-datomic-for-a-n-degrees-subgraph/38125324#38125324

timothypratley avatar Jul 04 '16 20:07 timothypratley

I believe ... works. Supporting recursion depth would be nice though.

metasoarous avatar Aug 19 '16 21:08 metasoarous

(side note: * can be a symbol; e.g.: '[* {:person/friend 2}])

metasoarous avatar Aug 19 '16 21:08 metasoarous

I don't think recursion works with wildcards, either with a stated depth or unlimited. Here is a test

file of the simple code I copied out of the existing pull_api to test the issue:

FalseProtagonist avatar Jan 28 '21 16:01 FalseProtagonist

recurse_test.txt sorry rejected the plain code

FalseProtagonist avatar Jan 28 '21 16:01 FalseProtagonist

I just tried to do it here, don't work when there is a wildcard, bounded or unbounded recursion.

wilkerlucio avatar Feb 09 '21 18:02 wilkerlucio