You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by J T <jt...@googlemail.com> on 2010/11/06 04:25:10 UTC

get_slice wont let me page backwards.

Hi,

I've been trying to write a wrapper around get_slice that supports paging
semantics.

I can get it to page forwards - starting with Start="" and then successively
passing in a new Start / Count.

But when i try going backwards from the end, passing Start = "" and Finish =
"X", it doesn't give me the N columns up to column X as I would expect.
It actually gives me a range of columns that fall much earlier in the paged
set.

Any suggestions on where I might be going wrong ?

Kt.

Re: get_slice wont let me page backwards.

Posted by Tyler Hobbs <ty...@riptano.com>.
You can do approximately the same thing as going forward, just use
column_reversed=True in the SlicePredicate.

- Tyler

On Fri, Nov 5, 2010 at 10:25 PM, J T <jt...@googlemail.com> wrote:

> Hi,
>
> I've been trying to write a wrapper around get_slice that supports paging
> semantics.
>
> I can get it to page forwards - starting with Start="" and then
> successively passing in a new Start / Count.
>
> But when i try going backwards from the end, passing Start = "" and Finish
> = "X", it doesn't give me the N columns up to column X as I would expect.
> It actually gives me a range of columns that fall much earlier in the paged
> set.
>
> Any suggestions on where I might be going wrong ?
>
> Kt.
>