traversing wide row automatic way to reverse #200

deanhiller opened this Issue Jan 27, 2013 · 1 comment

2 participants


We are exposing a Cursor type interface much like hibernate's ScrollableResults and so we have


but in astyanx once we form a query or reverse query, it automatically pages in one direction only. Think of search pages where user goes to page 1, then 2, then 3, then back to 2. There is nothing like this

boolean forward = true;
query.execute(forward); //goes forward
query.execute(forward); //goes forward again
query.exeucte(forward); //goes forward again

forward = false;
query.execute(forward); //goes back to the last result

at least I don't see anything.



Yeah I see what you are saying. There is no way to do this currently using the same query. i.e going back and forth using the same query and it's internal checkpoint. In any case we don't have such a use case. You'd probably be able to cache all the pages in memory and then scroll back and forth, though you'd have to be able to understand when you have visited the last cached page and then start a new query to the db using a token or row key derived from the last page.

Sorry for not being of help here, but this hasn't been a use case for us. Even if it was, I'd do this more in a recipe than in the api in order to keep things simple.

@opuneet opuneet closed this Nov 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment