Closed jonasseglare closed 2 months ago
It would be nice to be able to provide pull patterns being sets, so that we can, for example, write code like this:
(is (= (d/q '[:find (pull ?e #{:name}) . :where [?e :age 25]] test-db) {:name "Ivan"}))
where the pull pattern is a set: #{:name}. This kind of syntax is supported by Datomic, so it would be good if Datahike supports it too.
#{:name}
Support for this was added in the datalog-parser recently: https://github.com/replikativ/datalog-parser/commit/e2c0f3dd8ababbc07bcbd5ce22e1fd1d36b7f85e
We just have to update the datalog-parser dependency:
io.replikativ/datalog-parser {:mvn/version "0.2.29"}
We could choose to not change the API and force the user to always provide pull patterns that are sequential?. But this incompatibility with Datomic might be less convenient for the user.
sequential?
Describe the feature you would like to request
It would be nice to be able to provide pull patterns being sets, so that we can, for example, write code like this:
where the pull pattern is a set:
#{:name}
. This kind of syntax is supported by Datomic, so it would be good if Datahike supports it too.Support for this was added in the datalog-parser recently: https://github.com/replikativ/datalog-parser/commit/e2c0f3dd8ababbc07bcbd5ce22e1fd1d36b7f85e
Describe the solution you would like
We just have to update the datalog-parser dependency:
Describe alternatives you've considered
We could choose to not change the API and force the user to always provide pull patterns that are
sequential?
. But this incompatibility with Datomic might be less convenient for the user.