Class Cursor
Represents a UNIDIRECTIONAL SINGLE-pass (no buffering) cursor returned by the Find(query) command. The cursor needs to be closed by calling Dispose() if the eof has not been reached OR it will auto-close on EOF. The cursor may be enumerated only once. It is NOT thread-safe
Implements
System.Collections.Generic.IEnumerable<BSONDocument>
System.Collections.IEnumerable
System.Collections.Generic.IEnumerator<BSONDocument>
System.Collections.IEnumerator
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.Data.Access.MongoDb.Connector
Assembly: Azos.MongoDb.dll
Syntax
public sealed class Cursor : DisposableObject, IEnumerable<BSONDocument>, IEnumerable, IEnumerator<BSONDocument>, IEnumerator, IDisposable
Fields
DEFAULT_FETCH_BY
Declaration
public const int DEFAULT_FETCH_BY = 32
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
Collection
Collection that cursor is open against
Declaration
public Collection Collection { get; }
Property Value
Type | Description |
---|---|
Collection |
Current
Declaration
public BSONDocument Current { get; }
Property Value
Type | Description |
---|---|
BSONDocument |
EOF
True if EOF has been reached
Declaration
public bool EOF { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
FetchBy
Gets/sets the size of GET_MORE fetch
Declaration
public int FetchBy { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
ID
Server-supplied cursor ID
Declaration
public long ID { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Query
Query that was sent to the server and resulted in this cursor
Declaration
public Query Query { get; }
Property Value
Type | Description |
---|---|
Query |
Selector
Optional selector that was issued with Query or NULL
Declaration
public BSONDocument Selector { get; }
Property Value
Type | Description |
---|---|
BSONDocument |
Methods
Destructor()
Declaration
protected override void Destructor()
Overrides
GetEnumerator()
Declaration
public IEnumerator<BSONDocument> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<BSONDocument> |
MoveNext()
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
System.Boolean |
Reset()
Declaration
public void Reset()
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
IEnumerator.Current
Declaration
object IEnumerator.Current { get; }
Returns
Type | Description |
---|---|
System.Object |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Collections.Generic.IEnumerator<T>
System.Collections.IEnumerator
System.IDisposable