Skip to content

Commit 58e4018

Browse files
authored
SWIFT-869 allowDiskUse option for find should be documented as only being supported in 4.4+ (#494)
1 parent b6401f2 commit 58e4018

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/MongoSwift/Operations/FindOperation.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ public enum MongoCursorType {
3333
/// Options to use when executing a `find` command on a `MongoCollection`.
3434
public struct FindOptions: Codable {
3535
/// Enables the server to write to temporary files. When set to true, the find operation
36-
/// can write data to the _tmp subdirectory in the dbPath directory.
36+
/// can write data to the _tmp subdirectory in the dbPath directory. This helps prevent
37+
/// out-of-memory failures server side when working with large result sets.
38+
///
39+
/// - Note:
40+
/// This option is only supported in MongoDB 4.4+. Specifying it against earlier versions of the server
41+
/// will result in an error.
3742
public var allowDiskUse: Bool?
3843

3944
/// Get partial results from a mongos if some shards are down (instead of throwing an error).

0 commit comments

Comments
 (0)