Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 356 lines (317 sloc) 16.341 kb
08516f9 @samus Making the current branch more backward compatible.
authored
1 using System;
2 using System.Collections.Generic;
3
a054c05 @lanwin Fix namespaces.
lanwin authored
4 namespace MongoDB
08516f9 @samus Making the current branch more backward compatible.
authored
5 {
e425b33 @samus Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
6 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
7 /// A collection is a storage unit for a group of <see cref = "Document" />s. The documents do not all have to
8 /// contain the same schema but for efficiency they should all be similar.
e425b33 @samus Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
9 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
10 /// <remarks>
11 /// Safemode checks the database for any errors that may have occurred during
12 /// the insert such as a duplicate key constraint violation.
13 /// </remarks>
14 public interface IMongoCollection<T>
15 where T : class
08516f9 @samus Making the current branch more backward compatible.
authored
16 {
17 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
18 /// Gets the database.
08516f9 @samus Making the current branch more backward compatible.
authored
19 /// </summary>
20 /// <value>The database.</value>
e425b33 @samus Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
21 IMongoDatabase Database { get; }
08516f9 @samus Making the current branch more backward compatible.
authored
22
23 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
24 /// Name of the collection.
08516f9 @samus Making the current branch more backward compatible.
authored
25 /// </summary>
26 string Name { get; }
27
28 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
29 /// String value of the database name.
08516f9 @samus Making the current branch more backward compatible.
authored
30 /// </summary>
31 string DatabaseName { get; }
32
33 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
34 /// Full name of the collection databasename . collectionname
08516f9 @samus Making the current branch more backward compatible.
authored
35 /// </summary>
36 string FullName { get; }
37
38 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
39 /// Metadata about the collection such as indexes.
08516f9 @samus Making the current branch more backward compatible.
authored
40 /// </summary>
ab343f8 @lanwin Rename MetaData propertys to Metadata.
lanwin authored
41 CollectionMetadata Metadata { get; }
08516f9 @samus Making the current branch more backward compatible.
authored
42
43 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
44 /// Finds and returns the first document in a selector query.
08516f9 @samus Making the current branch more backward compatible.
authored
45 /// </summary>
79eebe4 @lanwin Add FindOne(string javascriptWhere)
lanwin authored
46 /// <param name="javascriptWhere">The where.</param>
47 /// <returns>
48 /// A <see cref="Document"/> from the collection.
49 /// </returns>
50 T FindOne(string javascriptWhere);
51
52 /// <summary>
53 /// Finds and returns the first document in a selector query.
54 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
55 /// <param name="selector">The selector.</param>
08516f9 @samus Making the current branch more backward compatible.
authored
56 /// <returns>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
57 /// A <see cref="Document"/> from the collection.
08516f9 @samus Making the current branch more backward compatible.
authored
58 /// </returns>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
59 T FindOne(object selector);
08516f9 @samus Making the current branch more backward compatible.
authored
60
61 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
62 /// Returns a cursor that contains all of the documents in the collection.
08516f9 @samus Making the current branch more backward compatible.
authored
63 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
64 /// <remarks>
65 /// Cursors load documents from the database in batches instead of all at once.
66 /// </remarks>
08516f9 @samus Making the current branch more backward compatible.
authored
67 ICursor<T> FindAll();
68
69 /// <summary>
79eebe4 @lanwin Add FindOne(string javascriptWhere)
lanwin authored
70 /// Uses the $where operator to query the collection. The value of the where is Javascript that will
71 /// produce a true for the documents that match the criteria.
08516f9 @samus Making the current branch more backward compatible.
authored
72 /// </summary>
79eebe4 @lanwin Add FindOne(string javascriptWhere)
lanwin authored
73 /// <param name="javascriptWhere">Javascript</param>
74 /// <returns></returns>
75 ICursor<T> Find(string javascriptWhere);
08516f9 @samus Making the current branch more backward compatible.
authored
76
77 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
78 /// Queries the collection using the query selector.
08516f9 @samus Making the current branch more backward compatible.
authored
79 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
80 /// <param name="selector">The selector.</param>
81 /// <returns>A <see cref="ICursor"/></returns>
82 ICursor<T> Find(object selector);
83
e425b33 @samus Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
84 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
85 /// Queries the collection using the specification and only returns a subset of fields.
e425b33 @samus Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
86 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
87 /// <param name="selector">The selector.</param>
88 /// <param name="fields">The fields.</param>
89 /// <returns>A <see cref="ICursor"/></returns>
90 ICursor<T> Find(object selector, object fields);
08516f9 @samus Making the current branch more backward compatible.
authored
91
92 /// <summary>
e425b33 @samus Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
93 /// Deprecated. Use the fluent interface on the cursor to specify a limit and skip value.
08516f9 @samus Making the current branch more backward compatible.
authored
94 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
95 /// <param name="selector">The selector.</param>
96 /// <param name="limit">The limit.</param>
97 /// <param name="skip">The skip.</param>
98 /// <returns></returns>
e425b33 @samus Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
99 [Obsolete("Use the fluent interface on ICursor for specifying limit and skip Find.Skip(x).Limit(y)")]
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
100 ICursor<T> Find(object selector, int limit, int skip);
08516f9 @samus Making the current branch more backward compatible.
authored
101
102 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
103 /// Queries the collection using the specification and only returns a subset of fields
08516f9 @samus Making the current branch more backward compatible.
authored
104 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
105 /// <param name="selector">The selector.</param>
106 /// <param name="limit">The limit.</param>
107 /// <param name="skip">The skip.</param>
108 /// <param name="fields">The fields.</param>
109 /// <returns></returns>
e425b33 @samus Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
110 [Obsolete("Use the fluent interface on ICursor for specifying limit and skip Find.Skip(x).Limit(y)")]
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
111 ICursor<T> Find(object selector, int limit, int skip, object fields);
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
112
4d69e28 Merge branch 'master' into typedcollections
Samuel Corder authored
113 /// <summary>
114 /// Executes a query and atomically applies a modifier operation to the first document returning the original document
115 /// by default.
116 /// </summary>
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
117 /// <param name="document">The document.</param>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
118 /// <param name="selector">The selector.</param>
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
119 /// <returns>A <see cref="Document"/></returns>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
120 T FindAndModify(object document, object selector);
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
121
4d69e28 Merge branch 'master' into typedcollections
Samuel Corder authored
122 /// <summary>
123 /// Executes a query and atomically applies a modifier operation to the first document returning the original document
124 /// by default.
125 /// </summary>
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
126 /// <param name="document">The document.</param>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
127 /// <param name="selector">The selector.</param>
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
128 /// <param name="sort"><see cref="Document"/> containing the names of columns to sort on with the values being the</param>
129 /// <returns>A <see cref="Document"/></returns>
4d69e28 Merge branch 'master' into typedcollections
Samuel Corder authored
130 /// <see cref="IndexOrder"/>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
131 T FindAndModify(object document, object selector, object sort);
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
132
4d69e28 Merge branch 'master' into typedcollections
Samuel Corder authored
133 /// <summary>
134 /// Executes a query and atomically applies a modifier operation to the first document returning the original document
135 /// by default.
136 /// </summary>
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
137 /// <param name="document">The document.</param>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
138 /// <param name="selector">The selector.</param>
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
139 /// <param name="returnNew">if set to <c>true</c> [return new].</param>
140 /// <returns>A <see cref="Document"/></returns>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
141 T FindAndModify(object document, object selector, bool returnNew);
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
142
4d69e28 Merge branch 'master' into typedcollections
Samuel Corder authored
143 /// <summary>
144 /// Executes a query and atomically applies a modifier operation to the first document returning the original document
145 /// by default.
146 /// </summary>
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
147 /// <param name="document">The document.</param>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
148 /// <param name="selector">The selector.</param>
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
149 /// <param name="sort"><see cref="Document"/> containing the names of columns to sort on with the values being the
150 /// <see cref="IndexOrder"/></param>
151 /// <param name="returnNew">if set to <c>true</c> [return new].</param>
e09bd0d @lanwin FindAndModify add fields and upsert.
lanwin authored
152 /// <param name="fields">The fields.</param>
153 /// <param name="upsert">if set to <c>true</c> [upsert].</param>
25bfc6c @lanwin Fix merge errors. Lot of test currently failing.
lanwin authored
154 /// <returns>A <see cref="Document"/></returns>
e09bd0d @lanwin FindAndModify add fields and upsert.
lanwin authored
155 T FindAndModify(object document, object selector, object sort, bool returnNew,object fields,bool upsert);
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
156
08516f9 @samus Making the current branch more backward compatible.
authored
157 /// <summary>
158 /// Entrypoint into executing a map/reduce query against the collection.
159 /// </summary>
160 /// <returns></returns>
ffa6baa @lanwin Made MapReduce non generic again, since we dose not need it to be generi...
lanwin authored
161 MapReduce MapReduce();
08516f9 @samus Making the current branch more backward compatible.
authored
162
163 ///<summary>
164 /// Count all items in the collection.
165 ///</summary>
166 long Count();
167
168 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
169 /// Count all items in a collection that match the query selector.
08516f9 @samus Making the current branch more backward compatible.
authored
170 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
171 /// <param name = "selector">The selector.</param>
172 /// <returns></returns>
08516f9 @samus Making the current branch more backward compatible.
authored
173 /// <remarks>
174 /// It will return 0 if the collection doesn't exist yet.
175 /// </remarks>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
176 long Count(object selector);
08516f9 @samus Making the current branch more backward compatible.
authored
177
178 /// <summary>
179 /// Inserts the Document into the collection.
180 /// </summary>
181 void Insert(object document, bool safemode);
182
183 /// <summary>
184 /// Inserts the specified doc.
185 /// </summary>
186 /// <param name = "document">The doc.</param>
187 void Insert(object document);
188
189 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
190 /// Bulk inserts the specified documents into the database.
08516f9 @samus Making the current branch more backward compatible.
authored
191 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
192 /// <remarks>
193 /// See the safemode description in the class description
194 /// </remarks>
08516f9 @samus Making the current branch more backward compatible.
authored
195 void Insert<TElement>(IEnumerable<TElement> documents, bool safemode);
196
197 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
198 /// Bulk inserts the specified documents into the database.
08516f9 @samus Making the current branch more backward compatible.
authored
199 /// </summary>
200 /// <param name = "documents">The documents.</param>
201 void Insert<TElement>(IEnumerable<TElement> documents);
202
203 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
204 /// Deletes documents from the collection according to the selector.
08516f9 @samus Making the current branch more backward compatible.
authored
205 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
206 /// <param name = "selector">The selector.</param>
207 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
08516f9 @samus Making the current branch more backward compatible.
authored
208 /// <remarks>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
209 /// An empty document will match all documents in the collection and effectively truncate it.
210 /// See the safemode description in the class description
08516f9 @samus Making the current branch more backward compatible.
authored
211 /// </remarks>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
212 [Obsolete("Use Remove instead")]
08516f9 @samus Making the current branch more backward compatible.
authored
213 void Delete(object selector, bool safemode);
214
215 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
216 /// Remove documents from the collection according to the selector.
08516f9 @samus Making the current branch more backward compatible.
authored
217 /// </summary>
218 /// <param name = "selector">The selector.</param>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
219 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
08516f9 @samus Making the current branch more backward compatible.
authored
220 /// <remarks>
221 /// An empty document will match all documents in the collection and effectively truncate it.
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
222 /// See the safemode description in the class description
08516f9 @samus Making the current branch more backward compatible.
authored
223 /// </remarks>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
224 void Remove(object selector, bool safemode);
225
226 /// <summary>
227 /// Deletes documents from the collection according to the selector.
228 /// </summary>
229 /// <param name = "selector">The selector.</param>
230 /// <remarks>
231 /// An empty document will match all documents in the collection and effectively truncate it.
232 /// </remarks>
233 [Obsolete("Use Remove instead")]
08516f9 @samus Making the current branch more backward compatible.
authored
234 void Delete(object selector);
235
236 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
237 /// Remove documents from the collection according to the selector.
08516f9 @samus Making the current branch more backward compatible.
authored
238 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
239 /// <param name="selector">The selector.</param>
240 /// <remarks>
241 /// An empty document will match all documents in the collection and effectively truncate it.
242 /// </remarks>
243 void Remove(object selector);
244
245 /// <summary>
246 /// Inserts or updates a document in the database. If the document does not contain an _id one will be
247 /// generated and an upsert sent. Otherwise the document matching the _id of the document will be updated.
248 /// </summary>
249 /// <param name = "document">The document.</param>
250 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
251 /// <remarks>
252 /// See the safemode description in the class description
253 /// </remarks>
a292e29 @lanwin Use Save for Update(doc).
lanwin authored
254 [Obsolete("Use Save instead")]
08516f9 @samus Making the current branch more backward compatible.
authored
255 void Update(object document, bool safemode);
256
257 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
258 /// Inserts or updates a document in the database. If the document does not contain an _id one will be
259 /// generated and an upsert sent. Otherwise the document matching the _id of the document will be updated.
08516f9 @samus Making the current branch more backward compatible.
authored
260 /// </summary>
261 /// <param name = "document">The document.</param>
a292e29 @lanwin Use Save for Update(doc).
lanwin authored
262 [Obsolete("Use Save instead")]
08516f9 @samus Making the current branch more backward compatible.
authored
263 void Update(object document);
264
265 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
266 /// Updates the specified document with the current document. In order to only do a partial update use a
267 /// document containing modifier operations ($set, $unset, $inc, etc.)
08516f9 @samus Making the current branch more backward compatible.
authored
268 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
269 /// <param name = "document">The document.</param>
270 /// <param name = "selector">The selector.</param>
271 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
272 /// <remarks>
273 /// See the safemode description in the class description
274 /// </remarks>
08516f9 @samus Making the current branch more backward compatible.
authored
275 void Update(object document, object selector, bool safemode);
276
277 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
278 /// Updates the specified document with the current document. In order to only do a partial update use a
279 /// document containing modifier operations ($set, $unset, $inc, etc.)
08516f9 @samus Making the current branch more backward compatible.
authored
280 /// </summary>
281 /// <param name = "document">The document.</param>
282 /// <param name = "selector">The selector.</param>
283 void Update(object document, object selector);
284
285 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
286 /// Updates the specified document with the current document. In order to only do a partial update use a
287 /// document containing modifier operations ($set, $unset, $inc, etc.)
08516f9 @samus Making the current branch more backward compatible.
authored
288 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
289 /// <param name = "document">The document.</param>
290 /// <param name = "selector">The selector.</param>
291 /// <param name = "flags">The flags.</param>
292 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
293 /// <remarks>
294 /// See the safemode description in the class description
295 /// </remarks>
08516f9 @samus Making the current branch more backward compatible.
authored
296 void Update(object document, object selector, UpdateFlags flags, bool safemode);
297
298 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
299 /// Updates the specified document with the current document. In order to only do a partial update use a
300 /// document containing modifier operations ($set, $unset, $inc, etc.)
08516f9 @samus Making the current branch more backward compatible.
authored
301 /// </summary>
302 /// <param name = "document">The <see cref = "Document" /> to update with</param>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
303 /// <param name = "selector">The query selector to find the document to update.</param>
08516f9 @samus Making the current branch more backward compatible.
authored
304 /// <param name = "flags"><see cref = "UpdateFlags" /></param>
305 void Update(object document, object selector, UpdateFlags flags);
306
307 /// <summary>
308 /// Runs a multiple update query against the database. It will wrap any
e425b33 @samus Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
309 /// doc with $set if the passed in doc doesn't contain any '$' modifier ops.
08516f9 @samus Making the current branch more backward compatible.
authored
310 /// </summary>
311 /// <param name = "document">The document.</param>
312 /// <param name = "selector">The selector.</param>
313 void UpdateAll(object document, object selector);
314
315 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
316 /// Runs a multiple update query against the database. It will wrap any
317 /// doc with $set if the passed in doc doesn't contain any '$' modifier ops.
08516f9 @samus Making the current branch more backward compatible.
authored
318 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
319 /// <param name = "document">The document.</param>
320 /// <param name = "selector">The selector.</param>
321 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
322 /// <remarks>
323 /// See the safemode description in the class description
324 /// </remarks>
08516f9 @samus Making the current branch more backward compatible.
authored
325 void UpdateAll(object document, object selector, bool safemode);
326
327 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
328 /// Inserts or updates a document in the database. If the document does not contain an _id one will be
329 /// generated and an upsert sent. Otherwise the document matching the _id of the document will be updated.
08516f9 @samus Making the current branch more backward compatible.
authored
330 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
331 /// <param name = "document">The document.</param>
08516f9 @samus Making the current branch more backward compatible.
authored
332 /// <remarks>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
333 /// The document will contain the _id that is saved to the database.
08516f9 @samus Making the current branch more backward compatible.
authored
334 /// </remarks>
335 void Save(object document);
6a97123 @lanwin Add impl. of Save(doc,safemode) and copy impl. of Update(doc) to it, so ...
lanwin authored
336
337 /// <summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
338 /// Saves a document to the database using an upsert.
6a97123 @lanwin Add impl. of Save(doc,safemode) and copy impl. of Update(doc) to it, so ...
lanwin authored
339 /// </summary>
fd139f9 @lanwin Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
340 /// <param name = "document">The document.</param>
341 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
342 void Save(object document, bool safemode);
e09bd0d @lanwin FindAndModify add fields and upsert.
lanwin authored
343
344 /// <summary>
345 /// Executes a query and atomically applies a modifier operation to the first document returning the original document
346 /// by default.
347 /// </summary>
348 /// <param name="document">The document.</param>
349 /// <param name="spec"><see cref="Document"/> to find the document.</param>
350 /// <param name="sort"><see cref="Document"/> containing the names of columns to sort on with the values being the
351 /// <see cref="IndexOrder"/></param>
352 /// <param name="returnNew">if set to <c>true</c> [return new].</param>
353 /// <returns>A <see cref="Document"/></returns>
354 T FindAndModify(object document, object spec, object sort, bool returnNew);
08516f9 @samus Making the current branch more backward compatible.
authored
355 }
356 }
Something went wrong with that request. Please try again.