I saw https://github.com/juji-io/datalevin/issues/126 was closed recently which implements :limit and :offset is it intentional that you cannot specify an :offset of 0 ?
It was intentional, but I can be persuaded otherwise.
I was thinking that if you put 0 for :offset, you might as well drop it altogether. However, now I think about it. It is more convenient to allow 0, especially if the query is generated programmatically. Sure, we will allow it in the next version.
Thank you for pointing this out.
Yes, that was exactly how I discovered 0 was not allowed, because I was generating queries and defaulted to 0, but defaulting to nil also worked
I ran into the same issue too, programatically building queries, at first I felt it should support 0 as that’s what sql databases do too, but then I wasn’t so sure. Btw, if you’re building more complex datalog queries programatically this library is fun https://github.com/favila/qslice
resolved