Fork me on GitHub
#xtdb
<
2021-08-05
>
richiardiandrea21:08:12

Hi there, is there a way with the pull syntax to tell the datalog engine to get back only one result? Some Eql is supported on properties/joins and I was wondering if that could be applied to the "root" result as well I know I can do a ffirst but I guess having in the query would make it easier to read

refset21:08:56

Hey! For the root, you mean like DataScript's :find ?e . ? Crux doesn't support that currently (it's just sugar), so you will have to stick with ffirst There was a discussion recently about cardinalities in the pull joins that is probably of interest https://github.com/juxt/crux/issues/1544 - but Crux's pull only helps with the reverse lookup case

refset21:08:08

We did consider something here recently https://github.com/juxt/crux/issues/1449 - but it's unlikely to become a priority any time soon. PRs are welcome though, of course :)

richiardiandrea21:08:00

yeah I think Datascript feature is what I had in mind

richiardiandrea21:08:13

ok thanks I'll follow the issues and use ffirst for now

🙏 3