public class ScanTupleIterable extends Object implements TupleIndexIterable, ScanEndedListener
Constructor and Description |
---|
ScanTupleIterable(KiviTableModel tableModel,
TransactionProvider txProvider,
String table) |
Modifier and Type | Method and Description |
---|---|
TupleIterable |
aggregate(List<String> aggregateFields,
Aggregation... aggregations)
Configure this TupleIterator to aggregate results.
|
void |
close() |
TupleIndexIterable |
excludeIndexMin()
Configures this TupleIterable to exclude the value passed in indexMin() method.
|
TupleIterable |
excludeMin()
Configures this TupleIterable to exclude the value passed in min() method.
|
TupleIterable |
filter(Filter filter)
Configures this TupleIterable to use a filter over the Table tuples.
|
TupleIterable |
first(long n)
Configures this TupleIterable to return the first n tuples.
|
TupleIndexIterable |
includeIndexMax()
Configures this TupleIterable to include the value passed in indexMax() method.
|
TupleIterable |
includeMax()
Configures this TupleIterable to include the value passed in max() method.
|
TupleIndexIterable |
index(Index indexName)
Configures this TupleIterable to scan following an index.
|
TupleIndexIterable |
indexFilter(Filter filter)
Configures the iterable to use an index filter.
|
TupleIndexIterable |
indexMax(TupleKey max)
Sets the maximum value for the index.
|
TupleIndexIterable |
indexMin(TupleKey min)
Sets the minimum value for the index.
|
Iterator<Tuple> |
iterator() |
TupleIterable |
max(TupleKey max)
Sets the maximum key value for the scan.
|
TupleIterable |
min(TupleKey min)
Sets the minimum key value for the scan.
|
TupleIterable |
project(Projection projection)
Configures this filter to make a projection over the result tuple fields.
|
TupleIterable |
reverse()
Configures this TupleIterable to do the scan in a reverse order.
|
TupleIterable |
rmax(TupleKey max)
Sets the maximum value for bidimensional partition.
|
TupleIterable |
rmin(TupleKey min)
Sets the minimum value for bidimensional partition.
|
void |
scanEnded(long tid,
int scid) |
TupleIterable |
skip(long n)
Configures this TupleIterable to skip the first n tuples.
|
TupleIterable |
sort()
Configures this TupleIterable to return values ordered by the PK
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ScanTupleIterable(KiviTableModel tableModel, TransactionProvider txProvider, String table)
public TupleIterable sort()
TupleIterable
sort
in interface TupleIterable
public TupleIterable reverse()
TupleIterable
reverse
in interface TupleIterable
public TupleIterable skip(long n)
TupleIterable
skip
in interface TupleIterable
n
- Number of tuples to be skippedpublic TupleIterable first(long n)
TupleIterable
first
in interface TupleIterable
n
- Number of tuples to be returnedpublic TupleIterable min(TupleKey min)
TupleIterable
min
in interface TupleIterable
min
- Key for the minimum valuepublic TupleIterable max(TupleKey max)
TupleIterable
max
in interface TupleIterable
max
- Key for the maximum valuepublic TupleIterable rmin(TupleKey min)
TupleIterable
rmin
in interface TupleIterable
min
- Minimum value for the bidimensional range.public TupleIterable rmax(TupleKey max)
TupleIterable
rmax
in interface TupleIterable
max
- Maximum value for the bidimensional range.public TupleIterable includeMax()
TupleIterable
includeMax
in interface TupleIterable
public TupleIterable excludeMin()
TupleIterable
excludeMin
in interface TupleIterable
public TupleIndexIterable index(Index indexName)
TupleIterable
index
in interface TupleIterable
indexName
- Index to be used. This index must exists and be defined over the
table which is being iterated.public TupleIndexIterable indexMin(TupleKey min)
TupleIndexIterable
indexMin
in interface TupleIndexIterable
min
- TupleKey with the index formatpublic TupleIndexIterable indexMax(TupleKey max)
TupleIndexIterable
indexMax
in interface TupleIndexIterable
max
- TupleKey with the index formatpublic TupleIndexIterable excludeIndexMin()
TupleIndexIterable
excludeIndexMin
in interface TupleIndexIterable
public TupleIndexIterable includeIndexMax()
TupleIndexIterable
includeIndexMax
in interface TupleIndexIterable
public TupleIndexIterable indexFilter(Filter filter)
TupleIndexIterable
indexFilter
in interface TupleIndexIterable
filter
- Filter to be usedpublic TupleIterable filter(Filter filter)
TupleIterable
filter
in interface TupleIterable
filter
- Filter to be used to filter tuple.public TupleIterable project(Projection projection)
TupleIterable
project
in interface TupleIterable
projection
- Projection object with defines the projection operation.public TupleIterable aggregate(List<String> aggregateFields, Aggregation... aggregations)
TupleIterable
IllegalStateException
aggregate
in interface TupleIterable
aggregateFields
- Fields over the aggregation will be defined. Can be an empty list if the
aggregations will be done over the full table.aggregations
- List of aggregation operations.public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void scanEnded(long tid, int scid)
scanEnded
in interface ScanEndedListener
Copyright © 2020. All rights reserved.