You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 490f490
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: Sources/PerfectMongoDB/MongoCollection.swift
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -322,7 +322,7 @@ public class MongoCollection {
322
322
*
323
323
* - parameter selector: BSON document with selection criteria
324
324
* - parameter update: BSON document to be used to update
325
-
* - parameter flag: Optional MongoUpdateFlag defaults to .None
325
+
* - parameter flag: Optional MongoUpdateFlag defaults to .None. `.multiUpdate` needs an update-operator document such as `{ $set: ... }`; with a replacement document it returns an error.
326
326
*
327
327
* - returns: Result object with status of update
328
328
*/
@@ -555,7 +555,7 @@ public class MongoCollection {
555
555
* - parameter limit: Optional. return no more than the supplied number of records.
556
556
* - parameter batchSize: Optional. Change number of automatically iterated documents.
557
557
*
558
-
* - returns: A cursor to the documents that match the query criteria. When the find() method “returns documents,” the method is actually returning a cursor to the documents.
558
+
* - returns: A cursor to the documents that match the query criteria. When the find() method “returns documents,” the method is actually returning a cursor to the documents. nil when a legacy `$query` query is invalid: `$query` isn't a document, or it's mixed with fields that don't start with `$`.
@@ -672,6 +672,8 @@ public class MongoCollection {
672
672
* - parameter batchSize: Optional. Change number of automatically iterated documents.
673
673
*
674
674
* - returns: the count of documents that would match a find() query. The count() method does not perform the find() operation but instead counts and returns the number of results that match a query.
675
+
*
676
+
* The count runs as an aggregate `$match`, so the query can't use `$where`, `$near` or `$nearSphere`; use `$expr`, or `$geoWithin` with `$center` / `$centerSphere`. In a legacy `$query` query, `$hint`, `$maxTimeMS`, `$comment` and `$collation` apply to the count; other modifiers such as `$orderby`, `$max` and `$min` are ignored. A negative `limit` counts like a positive one.
0 commit comments