asami

simongray 2022-03-09T09:37:33.768519Z

I wonder if there a way to do limits and offsets in Asami queries? I think there is some Datomic syntax using an outer map of {:query query :args args} but it doesn’t seem that Asami supports this.

simongray 2022-03-09T09:44:15.088429Z

for now I’m just doing drop and take on a memoized function result to achieve something similar

quoll 2022-03-09T11:10:11.199909Z

There isn't, but to be honest, that's how I’d implement it. It's more of an issue if it's a query syntax over a network connection (which will happen when I do SPARQL), but since it's embedded only, then it doesn't apply

simongray 2022-03-09T12:22:33.296029Z

Ok! No problem. I implemented sorting too. Thankfully, it wasn’t too hard in my case.

simongray 2022-03-09T12:22:59.998409Z

Just a shame to implement something if it’s already been implemented elsewhere.

quoll 2022-03-09T16:43:19.168359Z

Actually, I wouldn't memoize… (when implementing internally) It would use core.cache on the query to get the plan, but result would not be stored, because it's lazy. That means that the drop portion or a drop/take could involve re-execution, but this allows for large results that can't fit in memory

👀 1