ResultPager

sealed trait ResultPager[TReq, TRes] extends Iterator[Item]

The ResultPager allows iteration over the results from a DynamoDB query/scan as a single stream of items, handling the necessary paging details in the background.

The ResultPager allows iteration over the results from a DynamoDB query/scan as a single stream of items, handling the necessary paging details in the background.

DynamoDB paginates the result of query/scan operations. The data returned from a Query or Scan operation is limited to 1 MB; this means that if the result set exceeds 1 MB of data, you'll need to perform another Query or Scan operation to retrieve the next 1 MB of data. In addition, the limit parameter controls the number of items that you want DynamoDB to process in a single request before returning results. See http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Pagination

Each response from DynamoDB indicates if the processing has reached the end of the dataset, or if another request is needed in order to continue scanning where the last request finished.

When the items from a page is exhausted, the ResultPager will issue a new query/scan for the next page of results, until processing reaches the end of the dataset, or the client stops iterating over the result (as the return value is a Stream[Item])

trait Iterator[Item]
trait IterableOnceOps[Item, [A] =>> Iterator[A], Iterator[Item]]
trait IterableOnce[Item]
class Object
trait Matchable
class Any

Type members

Inherited classlikes

class GroupedIterator[B >: A]
Inherited from
Iterator

Value members

Abstract methods

def getCount(result: TRes): Int
def getItems(result: TRes): List[Map[String, AttributeValue]]
def getLastEvaluatedKey(result: TRes): Map[String, AttributeValue]
def invokeCallback(result: TRes): Unit
def operation: TReq => TRes
def request: TReq
def table: Table
def withExclusiveStartKey(request: TReq, lastKey: Map[String, AttributeValue]): TReq

Concrete methods

override def hasNext: Boolean
Definition Classes
Iterator
override def next(): Item
Definition Classes
Iterator

Inherited methods

@inline
final def ++[B >: Item](xs: => IterableOnce[B]): Iterator[B]
Inherited from
Iterator
@inline
final def addString(b: StringBuilder): StringBuilder
Inherited from
IterableOnceOps
@inline
final def addString(b: StringBuilder, sep: String): StringBuilder
Inherited from
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
Inherited from
IterableOnceOps
def buffered: BufferedIterator[Item]
Inherited from
Iterator
def collect[B](pf: PartialFunction[Item, B]): Iterator[B]
Inherited from
Iterator
def collectFirst[B](pf: PartialFunction[Item, B]): Option[B]
Inherited from
IterableOnceOps
def concat[B >: Item](xs: => IterableOnce[B]): Iterator[B]
Inherited from
Iterator
def contains(elem: Any): Boolean
Inherited from
Iterator
def copyToArray[B >: Item](xs: Array[B], start: Int, len: Int): Int
Inherited from
IterableOnceOps
@deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
def copyToArray[B >: Item](xs: Array[B], start: Int): Int
Inherited from
IterableOnceOps
@deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
def copyToArray[B >: Item](xs: Array[B]): Int
Inherited from
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: (Item, B) => Boolean): Boolean
Inherited from
IterableOnceOps
def count(p: Item => Boolean): Int
Inherited from
IterableOnceOps
def distinct: Iterator[Item]
Inherited from
Iterator
def distinctBy[B](f: Item => B): Iterator[Item]
Inherited from
Iterator
def drop(n: Int): Iterator[Item]
Inherited from
Iterator
def dropWhile(p: Item => Boolean): Iterator[Item]
Inherited from
Iterator
def duplicate: (Iterator[Item], Iterator[Item])
Inherited from
Iterator
def exists(p: Item => Boolean): Boolean
Inherited from
IterableOnceOps
def filter(p: Item => Boolean): Iterator[Item]
Inherited from
Iterator
def filterNot(p: Item => Boolean): Iterator[Item]
Inherited from
Iterator
def find(p: Item => Boolean): Option[Item]
Inherited from
IterableOnceOps
def flatMap[B](f: Item => IterableOnce[B]): Iterator[B]
Inherited from
Iterator
def flatten[B](ev: Item => IterableOnce[B]): Iterator[B]
Inherited from
Iterator
def fold[A1 >: Item](z: A1)(op: (A1, A1) => A1): A1
Inherited from
IterableOnceOps
def foldLeft[B](z: B)(op: (B, Item) => B): B
Inherited from
IterableOnceOps
def foldRight[B](z: B)(op: (Item, B) => B): B
Inherited from
IterableOnceOps
def forall(p: Item => Boolean): Boolean
Inherited from
IterableOnceOps
def foreach[U](f: Item => U): Unit
Inherited from
IterableOnceOps
def grouped[B >: Item](size: Int): GroupedIterator[B]
Inherited from
Iterator
def indexOf[B >: Item](elem: B, from: Int): Int
Inherited from
Iterator
def indexOf[B >: Item](elem: B): Int
Inherited from
Iterator
def indexWhere(p: Item => Boolean, from: Int): Int
Inherited from
Iterator
@deprecatedOverriding("isEmpty is defined as !hasNext; override hasNext instead", "2.13.0")
override def isEmpty: Boolean
Definition Classes
Iterator -> IterableOnceOps
Inherited from
Iterator
def isTraversableAgain: Boolean
Inherited from
IterableOnceOps
@inline
final def iterator: Iterator[Item]
Inherited from
Iterator
def knownSize: Int
Inherited from
IterableOnce
@inline
final def length: Int
Inherited from
Iterator
def map[B](f: Item => B): Iterator[B]
Inherited from
Iterator
def max[B >: Item](ord: Ordering[B]): Item
Inherited from
IterableOnceOps
def maxBy[B](f: Item => B)(cmp: Ordering[B]): Item
Inherited from
IterableOnceOps
def maxByOption[B](f: Item => B)(cmp: Ordering[B]): Option[Item]
Inherited from
IterableOnceOps
def maxOption[B >: Item](ord: Ordering[B]): Option[Item]
Inherited from
IterableOnceOps
def min[B >: Item](ord: Ordering[B]): Item
Inherited from
IterableOnceOps
def minBy[B](f: Item => B)(cmp: Ordering[B]): Item
Inherited from
IterableOnceOps
def minByOption[B](f: Item => B)(cmp: Ordering[B]): Option[Item]
Inherited from
IterableOnceOps
def minOption[B >: Item](ord: Ordering[B]): Option[Item]
Inherited from
IterableOnceOps
@inline
final def mkString: String
Inherited from
IterableOnceOps
@inline
final def mkString(sep: String): String
Inherited from
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String
Inherited from
IterableOnceOps
def nextOption(): Option[Item]
Inherited from
Iterator
@deprecatedOverriding("nonEmpty is defined as !isEmpty; override isEmpty instead", "2.13.0")
def nonEmpty: Boolean
Inherited from
IterableOnceOps
def padTo[B >: Item](len: Int, elem: B): Iterator[B]
Inherited from
Iterator
def partition(p: Item => Boolean): (Iterator[Item], Iterator[Item])
Inherited from
Iterator
def patch[B >: Item](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]
Inherited from
Iterator
def product[B >: Item](num: Numeric[B]): B
Inherited from
IterableOnceOps
def reduce[B >: Item](op: (B, B) => B): B
Inherited from
IterableOnceOps
def reduceLeft[B >: Item](op: (B, Item) => B): B
Inherited from
IterableOnceOps
def reduceLeftOption[B >: Item](op: (B, Item) => B): Option[B]
Inherited from
IterableOnceOps
def reduceOption[B >: Item](op: (B, B) => B): Option[B]
Inherited from
IterableOnceOps
def reduceRight[B >: Item](op: (Item, B) => B): B
Inherited from
IterableOnceOps
def reduceRightOption[B >: Item](op: (Item, B) => B): Option[B]
Inherited from
IterableOnceOps
protected def reversed: Iterable[Item]
Inherited from
IterableOnceOps
def sameElements[B >: Item](that: IterableOnce[B]): Boolean
Inherited from
Iterator
def scanLeft[B](z: B)(op: (B, Item) => B): Iterator[B]
Inherited from
Iterator
def size: Int
Inherited from
IterableOnceOps
def slice(from: Int, until: Int): Iterator[Item]
Inherited from
Iterator
def sliding[B >: Item](size: Int, step: Int): GroupedIterator[B]
Inherited from
Iterator
def span(p: Item => Boolean): (Iterator[Item], Iterator[Item])
Inherited from
Iterator
def splitAt(n: Int): (Iterator[Item], Iterator[Item])
Inherited from
IterableOnceOps
def stepper[S <: Stepper[_]](shape: StepperShape[Item, S]): S
Inherited from
IterableOnce
def sum[B >: Item](num: Numeric[B]): B
Inherited from
IterableOnceOps
def take(n: Int): Iterator[Item]
Inherited from
Iterator
def takeWhile(p: Item => Boolean): Iterator[Item]
Inherited from
Iterator
override def tapEach[U](f: Item => U): Iterator[Item]
Definition Classes
Iterator -> IterableOnceOps
Inherited from
Iterator
def to[C1](factory: Factory[Item, C1]): C1
Inherited from
IterableOnceOps
def toArray[B >: Item](ClassTag[B]): Array[B]
Inherited from
IterableOnceOps
@inline
final def toBuffer[B >: Item]: Buffer[B]
Inherited from
IterableOnceOps
def toIndexedSeq: IndexedSeq[Item]
Inherited from
IterableOnceOps
def toList: List[Item]
Inherited from
IterableOnceOps
def toMap[K, V](ev: Item <:< (K, V)): Map[K, V]
Inherited from
IterableOnceOps
def toSeq: Seq[Item]
Inherited from
IterableOnceOps
def toSet[B >: Item]: Set[B]
Inherited from
IterableOnceOps
override def toString(): String
Definition Classes
Iterator -> Any
Inherited from
Iterator
def toVector: Vector[Item]
Inherited from
IterableOnceOps
def withFilter(p: Item => Boolean): Iterator[Item]
Inherited from
Iterator
def zip[B](that: IterableOnce[B]): Iterator[(Item, B)]
Inherited from
Iterator
def zipAll[A1 >: Item, B](that: IterableOnce[B], thisElem: A1, thatElem: B): Iterator[(A1, B)]
Inherited from
Iterator
def zipWithIndex: Iterator[(Item, Int)]
Inherited from
Iterator

Deprecated and Inherited methods

@inline @deprecated("Use foldLeft instead of /:", "2.13.0")
final def /:[B](z: B)(op: (B, Item) => B): B
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Use foldRight instead of :\\", "2.13.0")
final def :\[B](z: B)(op: (Item, B) => B): B
Deprecated
Inherited from
IterableOnceOps
@deprecated("`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.", "2.13.0")
def aggregate[B](z: => B)(seqop: (B, Item) => B, combop: (B, B) => B): B
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Use `dest ++= coll` instead", "2.13.0")
final def copyToBuffer[B >: Item](dest: Buffer[B]): Unit
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("hasDefiniteSize on Iterator is the same as isEmpty", "2.13.0")
final override def hasDefiniteSize: Boolean
Deprecated
Definition Classes
Iterator -> IterableOnceOps
Inherited from
Iterator
@deprecated("Call scanRight on an Iterable instead.", "2.13.0")
def scanRight[B](z: B)(op: (Item, B) => B): Iterator[B]
Deprecated
Inherited from
Iterator
@deprecated("Iterator.seq always returns the iterator itself", "2.13.0")
def seq: ResultPager[TReq, TRes]
Deprecated
Inherited from
Iterator
@inline @deprecated("Use .iterator instead of .toIterator", "2.13.0")
final def toIterator: Iterator[Item]
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Use .to(LazyList) instead of .toStream", "2.13.0")
final def toStream: Stream[Item]
Deprecated
Inherited from
IterableOnceOps

Concrete fields

var index: Int
var items: Seq[Item]
var lastKey: Map[String, AttributeValue]
var pageNo: Int