Skip to main content

Commands: Documents: Stream

StreamDocs is used to stream documents which match chosen criteria from a database.

Syntax

IEnumerator<RavenJObject> StreamDocs(
Etag fromEtag = null,
string startsWith = null,
string matches = null,
int start = 0,
int pageSize = int.MaxValue,
string exclude = null,
RavenPagingInformation pagingInformation = null,
string skipAfter = null,
string transformer = null,
Dictionary<string, RavenJToken> transformerParameters = null);
Parameters
fromEtagEtagETag of a document from which stream should start (mutually exclusive with 'startsWith')
startsWithstringprefix for which documents should be streamed (mutually exclusive with 'fromEtag')
matchesstringpipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)
startintnumber of documents that should be skipped
pageSizeintmaximum number of documents that will be retrieved
excludeintpipe ('|') separated values for which document keys (after 'keyPrefix') should not be matched ('?' any single character, '*' any characters)
pagingInformationRavenPagingInformationused to perform rapid pagination on a server side
skipAfterStringskip document fetching until given key is found and return documents after that key (default: null)

Example

IEnumerator<RavenJObject> enumerator = store.DatabaseCommands.StreamDocs(null, "products/");
while (enumerator.MoveNext())
{
RavenJObject document = enumerator.Current;
}