Closed myguidingstar-zz closed 9 years ago
$
is a default source name. If you omit :in
, it assumes :in $
. If you don’t specify source in a pattern, it assumes $
, e.g. [$ ?a :foo 1]
.
In your second case you’re using non-default source name in :in
, but default in pattern. This should work:
(d/q '[:find ?a
:in $x
:where [$x ?a :foo 1]]
[[1 :foo 1]])
datascript.parser/parse-src-var
works as expected. I'm not sure where the problem is.