datascript

Casey 2021-11-08T12:05:17.020Z

Can someone point me to documentation about how the [:find [?e ...] and related syntax works? Specifically I'm referring to the "bracket ?e ellipsis" bit. I don't quite understand the semantics there. If I want to pull out the entity id of an entity from a query that I expect to only return a single result, I end up with a result like [1] and I have to call first to get the id out. I want to avoid the call to first by learning how that ellipsis syntax works.

refset 2021-11-08T12:13:24.020100Z

Hi, the syntax is "find specs" - have you seen the tests already? https://github.com/tonsky/datascript/blob/master/test/datascript/test/query_find_specs.cljc

Linus Ericsson 2021-11-08T15:20:39.020400Z

most of it is inspired of datomic: https://docs.datomic.com/on-prem/query/query.html