incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nate McCall <n...@datastax.com>
Subject Re: Limiting ColumnSlice range in second composite value
Date Fri, 02 Sep 2011 19:29:15 GMT
Instead of empty strings, try Character.[MAX|MIN-]_VALUE.

On Thu, Sep 1, 2011 at 8:27 PM, Anthony Ikeda
<anthony.ikeda.dev@gmail.com> wrote:
> My Column name is of Composite(TimeUUIDType, UTF8Type) and I can query
> across the TimeUUIDs correctly, but now I want to also range across the UTF8
> component. Is this possible?
>
> UUID start = uuidForDate(new Date(1979, 1, 1));
>
> UUID end = uuidForDate(new Date(Long.MAX_VALUE));
>
> String startState = "";
>
> String endState = "";
>
> if (desiredState != null) {
>
>     mLog.debug("Restricting state to [" + desiredState.getValue() + "]");
>
>     startState = desiredState.getValue();
>
>     endState = desiredState.getValue().concat("_");
>
> }
>
>
>
> Composite startComp = new Composite(start, startState);
>
> Composite endComp = new Composite(end, endState);
>
> query.setRange(startComp, endComp, true, count);
>
> So far I'm not seeing any effect setting my "endState" String value.
>
> Anthony

Mime
View raw message