New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:limit not working with query function #74
Comments
Hello @johnboy14, I know its been a while, but I ran into this today and I might have found the cause so I figured I would share in case someone else runs into this. You might want to check out the span-reqs option. By default, it is set (far/query client-opts table {:id [:eq id]} {:limit 10 :span-reqs {:max 1}}) I am not 100% sure that is what you are experiencing, but it might be worth checking out. About your other question, you can get the LastEvaluatedKey out of the result's meta, where it is stored as (let [query-results (far/query client-opts table {:id [:eq id]} {:limit 10 :span-reqs {:max 1}})]
(:last-prim-kvs (meta query-results))) I hope this helps |
I eventually worked out I needed to use the |
This one OK to close @johnboy14 ? Or do you have any suggestions for the docs? |
I ran into the very same problem and I'd still consider this a bug. Expanding docs would be a patch and fine as a first step, but not the correct solution in my opinion. |
Would a I'd be quite happy for the |
Until now, the default 'span-reqs' configuration stitched up to 5 requests together if last-prim-kvs implied it was necessary. This caused confusion because it's not getting all results but it's also not limited to just one page. The limit parameter also then became confusing, because the number of items returned by a request would be somewhere between '5' and '5 x limit'. After this commit the various 'get items' functions will return only one page by default and if subsequent pages are needed then span-reqs must be used. Closes #74
I'm trying to paginate results but my query doesn't seem to limit the result set as expected. Just to be clear I'm querying a table with a composite key of :id and :timestamp. The table has 25 items with the same :id.
Another thing. How do I retrieve the LastEvaluatedKey in my results.
The text was updated successfully, but these errors were encountered: