forked from samus/mongodb-csharp
/
ICursor.cs
118 lines (103 loc) · 3.58 KB
/
ICursor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
using System;
using System.Collections.Generic;
namespace MongoDB {
/// <summary>
///
/// </summary>
[Obsolete("Uses ICursor<Document> instead. This class will be possible not included in future releases.")]
public interface ICursor : IDisposable
{
/// <summary>
/// Gets the id.
/// </summary>
/// <value>The id.</value>
long Id { get; }
/// <summary>
/// Specs the specified spec.
/// </summary>
/// <param name="spec">The spec.</param>
/// <returns></returns>
ICursor Spec(Document spec);
/// <summary>
/// Limits the specified limit.
/// </summary>
/// <param name="limit">The limit.</param>
/// <returns></returns>
ICursor Limit(int limit);
/// <summary>
/// Skips the specified skip.
/// </summary>
/// <param name="skip">The skip.</param>
/// <returns></returns>
ICursor Skip(int skip);
/// <summary>
/// Fieldses the specified fields.
/// </summary>
/// <param name="fields">The fields.</param>
/// <returns></returns>
ICursor Fields(Document fields);
/// <summary>
/// Optionses the specified options.
/// </summary>
/// <param name="options">The options.</param>
/// <returns></returns>
ICursor Options(QueryOptions options);
/// <summary>
/// Sorts the specified field.
/// </summary>
/// <param name="field">The field.</param>
/// <returns></returns>
ICursor Sort(string field);
/// <summary>
/// Sorts the specified field.
/// </summary>
/// <param name="field">The field.</param>
/// <param name="order">The order.</param>
/// <returns></returns>
ICursor Sort(string field, IndexOrder order);
/// <summary>
/// Sorts the specified fields.
/// </summary>
/// <param name="fields">The fields.</param>
/// <returns></returns>
ICursor Sort(Document fields);
/// <summary>
/// Hints the specified index.
/// </summary>
/// <param name="index">The index.</param>
/// <returns></returns>
ICursor Hint(Document index);
/// <summary>
/// Keeps the cursor open.
/// </summary>
/// <param name="value">if set to <c>true</c> [value].</param>
/// <returns></returns>
/// <remarks>
/// By default cursors are closed automaticly after documents
/// are Enumerated.
/// </remarks>
ICursor KeepCursor(bool value);
/// <summary>
/// Snapshots this instance.
/// </summary>
/// <returns></returns>
ICursor Snapshot();
/// <summary>
/// Explains this instance.
/// </summary>
/// <returns></returns>
Document Explain();
/// <summary>
/// Gets a value indicating whether this instance is modifiable.
/// </summary>
/// <value>
/// <c>true</c> if this instance is modifiable; otherwise, <c>false</c>.
/// </value>
bool IsModifiable { get; }
/// <summary>
/// Gets the documents.
/// </summary>
/// <value>The documents.</value>
IEnumerable<Document> Documents { get; }
}
}