DocumentIterator

public struct DocumentIterator : Sequence, IteratorProtocol

An iterator of Documents in a Database, returned by Database.allDocuments or Query.allDocuments.

  • An iterator of Documents in a Database, returned by Database.allDocuments or Query.allDocuments.

    Declaration

    Swift

    public mutating func next() -> Document?

    Return Value

    The next element in the underlying sequence if a next element exists; otherwise, nil.