The scan method accepts a Range<PK> which identifies the startKey and endKey, and returns all contiguous
rows between them, not skipping or filtering any.
The scan method accepts a Range<PK> which identifies the startKey and endKey, and returns all contiguous
rows between them, not skipping or filtering any. Implementations will generally query the database in batches to
avoid long transactions and huge result sets.
When providing startKey and endKey, implementations will ignore fields after the first null. For example, when
scanning a phone book with startKey:
* (null, null) is valid and will start at the beginning of the book
* (Corgan, null) is valid and will start at the first Corgan
* (Corgan, Matt) is valid and will start at Corgan, Matt
* (null, Matt) is invalid. The Matt is ignored, so it is equivalent to (null, null)
Note that (null, Matt) will NOT do any filtering for rows with firstName=Matt. To avoid tablescans we are
returning all rows in the range to the client where the client can then filter. A predicate push-down feature may
be added, but it will likely use a separate interface method.
Specified by:
scan in interface SortedStorageReader<PK extends io.datarouter.model.key.primary.PrimaryKey<PK>,D extends io.datarouter.model.databean.Databean<PK,D>>