Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 357 lines (318 sloc) 16.43 kb
08516f9 Sam Corder Making the current branch more backward compatible.
authored
1 using System;
2 using System.Collections.Generic;
3
a054c05 Steve Wagner Fix namespaces.
lanwin authored
4 namespace MongoDB
08516f9 Sam Corder Making the current branch more backward compatible.
authored
5 {
e425b33 Sam Corder Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
6 /// <summary>
fd139f9 Steve Wagner 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 Sam Corder Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
9 /// </summary>
fd139f9 Steve Wagner 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 Sam Corder Making the current branch more backward compatible.
authored
16 {
17 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
18 /// Gets the database.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
19 /// </summary>
20 /// <value>The database.</value>
e425b33 Sam Corder Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
21 IMongoDatabase Database { get; }
08516f9 Sam Corder Making the current branch more backward compatible.
authored
22
23 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
24 /// Name of the collection.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
25 /// </summary>
26 string Name { get; }
27
28 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
29 /// String value of the database name.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
30 /// </summary>
31 string DatabaseName { get; }
32
33 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
34 /// Full name of the collection databasename . collectionname
08516f9 Sam Corder Making the current branch more backward compatible.
authored
35 /// </summary>
36 string FullName { get; }
37
38 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
39 /// Metadata about the collection such as indexes.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
40 /// </summary>
ab343f8 Steve Wagner Rename MetaData propertys to Metadata.
lanwin authored
41 CollectionMetadata Metadata { get; }
08516f9 Sam Corder Making the current branch more backward compatible.
authored
42
43 /// <summary>
fd139f9 Steve Wagner 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 Sam Corder Making the current branch more backward compatible.
authored
45 /// </summary>
79eebe4 Steve Wagner 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 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
55 /// <param name="selector">The selector.</param>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
56 /// <returns>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
57 /// A <see cref="Document"/> from the collection.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
58 /// </returns>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
59 T FindOne(object selector);
08516f9 Sam Corder Making the current branch more backward compatible.
authored
60
61 /// <summary>
fd139f9 Steve Wagner 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 Sam Corder Making the current branch more backward compatible.
authored
63 /// </summary>
fd139f9 Steve Wagner 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 Sam Corder Making the current branch more backward compatible.
authored
67 ICursor<T> FindAll();
68
69 /// <summary>
79eebe4 Steve Wagner 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 Sam Corder Making the current branch more backward compatible.
authored
72 /// </summary>
79eebe4 Steve Wagner Add FindOne(string javascriptWhere)
lanwin authored
73 /// <param name="javascriptWhere">Javascript</param>
74 /// <returns></returns>
75 ICursor<T> Find(string javascriptWhere);
08516f9 Sam Corder Making the current branch more backward compatible.
authored
76
77 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
78 /// Queries the collection using the query selector.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
79 /// </summary>
fd139f9 Steve Wagner 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 Sam Corder Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
84 /// <summary>
fd139f9 Steve Wagner 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 Sam Corder Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
86 /// </summary>
fd139f9 Steve Wagner 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 Sam Corder Making the current branch more backward compatible.
authored
91
92 /// <summary>
e425b33 Sam Corder 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 Sam Corder Making the current branch more backward compatible.
authored
94 /// </summary>
fd139f9 Steve Wagner 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 Sam Corder 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 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
100 ICursor<T> Find(object selector, int limit, int skip);
08516f9 Sam Corder Making the current branch more backward compatible.
authored
101
102 /// <summary>
fd139f9 Steve Wagner 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 Sam Corder Making the current branch more backward compatible.
authored
104 /// </summary>
fd139f9 Steve Wagner 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 Sam Corder 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 Steve Wagner 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 Steve Wagner 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 Steve Wagner Fix merge errors. Lot of test currently failing.
lanwin authored
117 /// <param name="document">The document.</param>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
118 /// <param name="selector">The selector.</param>
25bfc6c Steve Wagner Fix merge errors. Lot of test currently failing.
lanwin authored
119 /// <returns>A <see cref="Document"/></returns>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
120 T FindAndModify(object document, object selector);
25bfc6c Steve Wagner 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 Steve Wagner Fix merge errors. Lot of test currently failing.
lanwin authored
126 /// <param name="document">The document.</param>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
127 /// <param name="selector">The selector.</param>
25bfc6c Steve Wagner 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 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
131 T FindAndModify(object document, object selector, object sort);
25bfc6c Steve Wagner 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 Steve Wagner Fix merge errors. Lot of test currently failing.
lanwin authored
137 /// <param name="document">The document.</param>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
138 /// <param name="selector">The selector.</param>
25bfc6c Steve Wagner 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 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
141 T FindAndModify(object document, object selector, bool returnNew);
25bfc6c Steve Wagner 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 Steve Wagner Fix merge errors. Lot of test currently failing.
lanwin authored
147 /// <param name="document">The document.</param>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
148 /// <param name="selector">The selector.</param>
25bfc6c Steve Wagner 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>
e09bd0d Steve Wagner FindAndModify add fields and upsert.
lanwin authored
151 /// <param name="fields">The fields.</param>
6397a0f Steve Wagner More find and modify improvments.
lanwin authored
152 /// <param name="remove">if set to <c>true</c> [remove].</param>
153 /// <param name="returnNew">if set to <c>true</c> [return new].</param>
e09bd0d Steve Wagner FindAndModify add fields and upsert.
lanwin authored
154 /// <param name="upsert">if set to <c>true</c> [upsert].</param>
25bfc6c Steve Wagner Fix merge errors. Lot of test currently failing.
lanwin authored
155 /// <returns>A <see cref="Document"/></returns>
6397a0f Steve Wagner More find and modify improvments.
lanwin authored
156 T FindAndModify(object document, object selector, object sort, object fields, bool remove, bool returnNew, bool upsert);
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
157
08516f9 Sam Corder Making the current branch more backward compatible.
authored
158 /// <summary>
159 /// Entrypoint into executing a map/reduce query against the collection.
160 /// </summary>
161 /// <returns></returns>
ffa6baa Steve Wagner Made MapReduce non generic again, since we dose not need it to be generi...
lanwin authored
162 MapReduce MapReduce();
08516f9 Sam Corder Making the current branch more backward compatible.
authored
163
164 ///<summary>
165 /// Count all items in the collection.
166 ///</summary>
167 long Count();
168
169 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
170 /// Count all items in a collection that match the query selector.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
171 /// </summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
172 /// <param name = "selector">The selector.</param>
173 /// <returns></returns>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
174 /// <remarks>
175 /// It will return 0 if the collection doesn't exist yet.
176 /// </remarks>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
177 long Count(object selector);
08516f9 Sam Corder Making the current branch more backward compatible.
authored
178
179 /// <summary>
180 /// Inserts the Document into the collection.
181 /// </summary>
182 void Insert(object document, bool safemode);
183
184 /// <summary>
185 /// Inserts the specified doc.
186 /// </summary>
187 /// <param name = "document">The doc.</param>
188 void Insert(object document);
189
190 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
191 /// Bulk inserts the specified documents into the database.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
192 /// </summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
193 /// <remarks>
194 /// See the safemode description in the class description
195 /// </remarks>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
196 void Insert<TElement>(IEnumerable<TElement> documents, bool safemode);
197
198 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
199 /// Bulk inserts the specified documents into the database.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
200 /// </summary>
201 /// <param name = "documents">The documents.</param>
202 void Insert<TElement>(IEnumerable<TElement> documents);
203
204 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
205 /// Deletes documents from the collection according to the selector.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
206 /// </summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
207 /// <param name = "selector">The selector.</param>
208 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
209 /// <remarks>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
210 /// An empty document will match all documents in the collection and effectively truncate it.
211 /// See the safemode description in the class description
08516f9 Sam Corder Making the current branch more backward compatible.
authored
212 /// </remarks>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
213 [Obsolete("Use Remove instead")]
08516f9 Sam Corder Making the current branch more backward compatible.
authored
214 void Delete(object selector, bool safemode);
215
216 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
217 /// Remove documents from the collection according to the selector.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
218 /// </summary>
219 /// <param name = "selector">The selector.</param>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
220 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
221 /// <remarks>
222 /// An empty document will match all documents in the collection and effectively truncate it.
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
223 /// See the safemode description in the class description
08516f9 Sam Corder Making the current branch more backward compatible.
authored
224 /// </remarks>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
225 void Remove(object selector, bool safemode);
226
227 /// <summary>
228 /// Deletes documents from the collection according to the selector.
229 /// </summary>
230 /// <param name = "selector">The selector.</param>
231 /// <remarks>
232 /// An empty document will match all documents in the collection and effectively truncate it.
233 /// </remarks>
234 [Obsolete("Use Remove instead")]
08516f9 Sam Corder Making the current branch more backward compatible.
authored
235 void Delete(object selector);
236
237 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
238 /// Remove documents from the collection according to the selector.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
239 /// </summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
240 /// <param name="selector">The selector.</param>
241 /// <remarks>
242 /// An empty document will match all documents in the collection and effectively truncate it.
243 /// </remarks>
244 void Remove(object selector);
245
246 /// <summary>
247 /// Inserts or updates a document in the database. If the document does not contain an _id one will be
248 /// generated and an upsert sent. Otherwise the document matching the _id of the document will be updated.
249 /// </summary>
250 /// <param name = "document">The document.</param>
251 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
252 /// <remarks>
253 /// See the safemode description in the class description
254 /// </remarks>
a292e29 Steve Wagner Use Save for Update(doc).
lanwin authored
255 [Obsolete("Use Save instead")]
08516f9 Sam Corder Making the current branch more backward compatible.
authored
256 void Update(object document, bool safemode);
257
258 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
259 /// Inserts or updates a document in the database. If the document does not contain an _id one will be
260 /// generated and an upsert sent. Otherwise the document matching the _id of the document will be updated.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
261 /// </summary>
262 /// <param name = "document">The document.</param>
a292e29 Steve Wagner Use Save for Update(doc).
lanwin authored
263 [Obsolete("Use Save instead")]
08516f9 Sam Corder Making the current branch more backward compatible.
authored
264 void Update(object document);
265
266 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
267 /// Updates the specified document with the current document. In order to only do a partial update use a
268 /// document containing modifier operations ($set, $unset, $inc, etc.)
08516f9 Sam Corder Making the current branch more backward compatible.
authored
269 /// </summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
270 /// <param name = "document">The document.</param>
271 /// <param name = "selector">The selector.</param>
272 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
273 /// <remarks>
274 /// See the safemode description in the class description
275 /// </remarks>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
276 void Update(object document, object selector, bool safemode);
277
278 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
279 /// Updates the specified document with the current document. In order to only do a partial update use a
280 /// document containing modifier operations ($set, $unset, $inc, etc.)
08516f9 Sam Corder Making the current branch more backward compatible.
authored
281 /// </summary>
282 /// <param name = "document">The document.</param>
283 /// <param name = "selector">The selector.</param>
284 void Update(object document, object selector);
285
286 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
287 /// Updates the specified document with the current document. In order to only do a partial update use a
288 /// document containing modifier operations ($set, $unset, $inc, etc.)
08516f9 Sam Corder Making the current branch more backward compatible.
authored
289 /// </summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
290 /// <param name = "document">The document.</param>
291 /// <param name = "selector">The selector.</param>
292 /// <param name = "flags">The flags.</param>
293 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
294 /// <remarks>
295 /// See the safemode description in the class description
296 /// </remarks>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
297 void Update(object document, object selector, UpdateFlags flags, bool safemode);
298
299 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
300 /// Updates the specified document with the current document. In order to only do a partial update use a
301 /// document containing modifier operations ($set, $unset, $inc, etc.)
08516f9 Sam Corder Making the current branch more backward compatible.
authored
302 /// </summary>
303 /// <param name = "document">The <see cref = "Document" /> to update with</param>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
304 /// <param name = "selector">The query selector to find the document to update.</param>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
305 /// <param name = "flags"><see cref = "UpdateFlags" /></param>
306 void Update(object document, object selector, UpdateFlags flags);
307
308 /// <summary>
309 /// Runs a multiple update query against the database. It will wrap any
e425b33 Sam Corder Moved the generic cursor and mongocollection classes to a Generic namesp...
authored
310 /// doc with $set if the passed in doc doesn't contain any '$' modifier ops.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
311 /// </summary>
312 /// <param name = "document">The document.</param>
313 /// <param name = "selector">The selector.</param>
314 void UpdateAll(object document, object selector);
315
316 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
317 /// Runs a multiple update query against the database. It will wrap any
318 /// doc with $set if the passed in doc doesn't contain any '$' modifier ops.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
319 /// </summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
320 /// <param name = "document">The document.</param>
321 /// <param name = "selector">The selector.</param>
322 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
323 /// <remarks>
324 /// See the safemode description in the class description
325 /// </remarks>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
326 void UpdateAll(object document, object selector, bool safemode);
327
328 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
329 /// Inserts or updates a document in the database. If the document does not contain an _id one will be
330 /// generated and an upsert sent. Otherwise the document matching the _id of the document will be updated.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
331 /// </summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
332 /// <param name = "document">The document.</param>
08516f9 Sam Corder Making the current branch more backward compatible.
authored
333 /// <remarks>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
334 /// The document will contain the _id that is saved to the database.
08516f9 Sam Corder Making the current branch more backward compatible.
authored
335 /// </remarks>
336 void Save(object document);
6a97123 Steve Wagner Add impl. of Save(doc,safemode) and copy impl. of Update(doc) to it, so ...
lanwin authored
337
338 /// <summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
339 /// Saves a document to the database using an upsert.
6a97123 Steve Wagner Add impl. of Save(doc,safemode) and copy impl. of Update(doc) to it, so ...
lanwin authored
340 /// </summary>
fd139f9 Steve Wagner Add collection.Remove and mare collection.Delete as obsolete because tha...
lanwin authored
341 /// <param name = "document">The document.</param>
342 /// <param name = "safemode">if set to <c>true</c> [safemode].</param>
343 void Save(object document, bool safemode);
e09bd0d Steve Wagner FindAndModify add fields and upsert.
lanwin authored
344
345 /// <summary>
346 /// Executes a query and atomically applies a modifier operation to the first document returning the original document
347 /// by default.
348 /// </summary>
349 /// <param name="document">The document.</param>
350 /// <param name="spec"><see cref="Document"/> to find the document.</param>
351 /// <param name="sort"><see cref="Document"/> containing the names of columns to sort on with the values being the
352 /// <see cref="IndexOrder"/></param>
353 /// <param name="returnNew">if set to <c>true</c> [return new].</param>
354 /// <returns>A <see cref="Document"/></returns>
355 T FindAndModify(object document, object spec, object sort, bool returnNew);
08516f9 Sam Corder Making the current branch more backward compatible.
authored
356 }
357 }
Something went wrong with that request. Please try again.