/** * Creates a {@code DataRange} to query all rows over the provided key range. * * @param keyRange the (partition key) range to query. * * @return the newly create {@code DataRange}. */ public static DataRange forKeyRange(Range<PartitionPosition> keyRange) { return new DataRange(keyRange, new ClusteringIndexSliceFilter(Slices.ALL, false)); }
/** * Creates a {@code DataRange} to query all rows over the provided key range. * * @param keyRange the (partition key) range to query. * * @return the newly create {@code DataRange}. */ public static DataRange forKeyRange(Range<PartitionPosition> keyRange) { return new DataRange(keyRange, new ClusteringIndexSliceFilter(Slices.ALL, false)); }
/** * Creates a {@code DataRange} to query all rows over the provided key range. * * @param keyRange the (partition key) range to query. * * @return the newly create {@code DataRange}. */ public static DataRange forKeyRange(Range<PartitionPosition> keyRange) { return new DataRange(keyRange, new ClusteringIndexSliceFilter(Slices.ALL, false)); }
/** * Creates a {@code DataRange} to query all rows over the provided key range. * * @param keyRange the (partition key) range to query. * * @return the newly create {@code DataRange}. */ public static DataRange forKeyRange(Range<PartitionPosition> keyRange) { return new DataRange(keyRange, new ClusteringIndexSliceFilter(Slices.ALL, false)); }
public ClusteringIndexSliceFilter forPaging(ClusteringComparator comparator, Clustering lastReturned, boolean inclusive) { Slices newSlices = slices.forPaging(comparator, lastReturned, inclusive, reversed); return slices == newSlices ? this : new ClusteringIndexSliceFilter(newSlices, reversed); }
public ClusteringIndexSliceFilter forPaging(ClusteringComparator comparator, Clustering lastReturned, boolean inclusive) { Slices newSlices = slices.forPaging(comparator, lastReturned, inclusive, reversed); return slices == newSlices ? this : new ClusteringIndexSliceFilter(newSlices, reversed); }
@Override protected ClusteringIndexFilter makeFilter() { return new ClusteringIndexSliceFilter(sliceBuilder.build(), reversed); }
public ClusteringIndexFilter deserialize(DataInputPlus in, int version, CFMetaData metadata, boolean reversed) throws IOException { Slices slices = Slices.serializer.deserialize(in, version, metadata); return new ClusteringIndexSliceFilter(slices, reversed); } }
@Override protected ClusteringIndexFilter makeFilter() { return new ClusteringIndexSliceFilter(sliceBuilder.build(), reversed); }
public ClusteringIndexFilter deserialize(DataInputPlus in, int version, CFMetaData metadata, boolean reversed) throws IOException { Slices slices = Slices.serializer.deserialize(in, version, metadata); return new ClusteringIndexSliceFilter(slices, reversed); } }
public ClusteringIndexSliceFilter forPaging(ClusteringComparator comparator, Clustering lastReturned, boolean inclusive) { Slices newSlices = slices.forPaging(comparator, lastReturned, inclusive, reversed); return slices == newSlices ? this : new ClusteringIndexSliceFilter(newSlices, reversed); }
public ClusteringIndexSliceFilter forPaging(ClusteringComparator comparator, Clustering lastReturned, boolean inclusive) { Slices newSlices = slices.forPaging(comparator, lastReturned, inclusive, reversed); return slices == newSlices ? this : new ClusteringIndexSliceFilter(newSlices, reversed); }
public ClusteringIndexFilter deserialize(DataInputPlus in, int version, CFMetaData metadata, boolean reversed) throws IOException { Slices slices = Slices.serializer.deserialize(in, version, metadata); return new ClusteringIndexSliceFilter(slices, reversed); } }
public ClusteringIndexFilter deserialize(DataInputPlus in, int version, CFMetaData metadata, boolean reversed) throws IOException { Slices slices = Slices.serializer.deserialize(in, version, metadata); return new ClusteringIndexSliceFilter(slices, reversed); } }
@Override protected ClusteringIndexFilter makeFilter() { return new ClusteringIndexSliceFilter(sliceBuilder.build(), reversed); }
/** * Creates a new single partition slice command for the provided slices. * * @param metadata the table to query. * @param nowInSec the time in seconds to use are "now" for this query. * @param key the partition key for the partition to query. * @param slices the slices of rows to query. * * @return a newly created read command that queries the {@code slices} in {@code key}. The returned query will * query every columns for the table (without limit or row filtering) and be in forward order. */ public static SinglePartitionReadCommand create(CFMetaData metadata, int nowInSec, DecoratedKey key, Slices slices) { ClusteringIndexSliceFilter filter = new ClusteringIndexSliceFilter(slices, false); return create(metadata, nowInSec, ColumnFilter.all(metadata), RowFilter.NONE, DataLimits.NONE, key, filter); }
/** * Creates a new single partition slice command for the provided slices. * * @param metadata the table to query. * @param nowInSec the time in seconds to use are "now" for this query. * @param key the partition key for the partition to query. * @param slices the slices of rows to query. * * @return a newly created read command that queries the {@code slices} in {@code key}. The returned query will * query every columns for the table (without limit or row filtering) and be in forward order. */ public static SinglePartitionReadCommand create(CFMetaData metadata, int nowInSec, DecoratedKey key, Slices slices) { ClusteringIndexSliceFilter filter = new ClusteringIndexSliceFilter(slices, false); return create(metadata, nowInSec, ColumnFilter.all(metadata), RowFilter.NONE, DataLimits.NONE, key, filter); }
public SinglePartitionReadCommand readCommand(int nowInSec) { assert staticConditions != null || !conditions.isEmpty(); // Fetch all columns, but query only the selected ones ColumnFilter columnFilter = ColumnFilter.selection(columnsToRead()); // With only a static condition, we still want to make the distinction between a non-existing partition and one // that exists (has some live data) but has not static content. So we query the first live row of the partition. if (conditions.isEmpty()) return SinglePartitionReadCommand.create(cfm, nowInSec, columnFilter, RowFilter.NONE, DataLimits.cqlLimits(1), key, new ClusteringIndexSliceFilter(Slices.ALL, false)); ClusteringIndexNamesFilter filter = new ClusteringIndexNamesFilter(conditions.navigableKeySet(), false); return SinglePartitionReadCommand.create(cfm, nowInSec, key, columnFilter, filter); }
private ClusteringIndexFilter toInternalFilter(CFMetaData metadata, ColumnParent parent, SliceRange range) { if (metadata.isSuper() && parent.isSetSuper_column()) return new ClusteringIndexNamesFilter(FBUtilities.singleton(Clustering.make(parent.bufferForSuper_column()), metadata.comparator), range.reversed); else return new ClusteringIndexSliceFilter(makeSlices(metadata, range), range.reversed); }
private ClusteringIndexFilter toInternalFilter(CFMetaData metadata, ColumnParent parent, SliceRange range) { if (metadata.isSuper() && parent.isSetSuper_column()) return new ClusteringIndexNamesFilter(FBUtilities.singleton(Clustering.make(parent.bufferForSuper_column()), metadata.comparator), range.reversed); else return new ClusteringIndexSliceFilter(makeSlices(metadata, range), range.reversed); }