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);
Parameters | ||
---|---|---|
fromEtag | Etag | ETag of a document from which stream should start (mutually exclusive with 'startsWith') |
startsWith | string | prefix for which documents should be streamed (mutually exclusive with 'fromEtag') |
matches | string | pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters) |
start | int | number of documents that should be skipped |
pageSize | int | maximum number of documents that will be retrieved |
exclude | int | pipe ('|') separated values for which document keys (after 'keyPrefix') should not be matched ('?' any single character, '*' any characters) |
pagingInformation | RavenPagingInformation | used to perform rapid pagination on a server side |
skipAfter | String | skip 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;
}