Fork me on GitHub

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.


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


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


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


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


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