Table of Contents

Interface IResultCursor

Namespace
Neo4j.Driver
Assembly
Neo4j.Driver.dll

Provides access to the result as an asynchronous stream of IRecords. The records in the result is lazily retrieved and can be visited only once in a sequential order.

public interface IResultCursor
Extension Methods

Remarks

Calling ToListAsync(IResultCursor, CancellationToken) will enumerate the entire stream.

Properties

Current

Returns the current record that has already been read via FetchAsync().

IsOpen

Get whether the cursor is open to read records, a cursor will be considered open if ConsumeAsync() has not been called.
Attempting to read records from a closed cursor will throw ResultConsumedException.
Cursors can also be closed if its session is disposed or its session runs a query.

Methods

ConsumeAsync()

Asynchronously gets the IResultSummary after streaming the whole records to the client. If the records in the result are not fully consumed, then calling this method will discard all remaining records to yield the summary. If you want to obtain the summary without discarding the records, consider buffering the unconsumed result using ToListAsync(IResultCursor, CancellationToken). If all records in the records stream are already consumed, then this method will return the summary directly.

FetchAsync()

Asynchronously tries to advance to the next record.

KeysAsync()

Gets the keys in the result.

PeekAsync()

Asynchronously investigates the next upcoming record without changing the current position in the result.