File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change 11/// Describes the modes for configuring the fullDocument field of a change stream document.
2- public enum FullDocument : RawRepresentable , Codable {
2+ public struct FullDocument : RawRepresentable , Codable {
33 /// Specifies that the `fullDocument` field of an update event will contain a copy of the entire document that
44 /// was changed from some time after the change occurred. If the document was deleted since the updated happened,
55 /// it will be nil.
6- case updateLookup
6+ public static let updateLookup = FullDocument ( " updateLookup " )
77 /// For an unknown value. For forwards compatibility, no error will be thrown when an unknown value is provided.
8- case other( String )
9-
10- public var rawValue : String {
11- switch self {
12- case . updateLookup:
13- return " updateLookup "
14- case let . other( v) :
15- return v
16- }
8+ public static func other( _ value: String ) -> FullDocument {
9+ FullDocument ( value)
1710 }
1811
19- public init ? ( rawValue: String ) {
20- switch rawValue {
21- case " updateLookup " :
22- self = . updateLookup
23- default :
24- self = . other( rawValue)
25- }
26- }
12+ public var rawValue : String
13+
14+ /// Creates a `FullDocument`. Never returns nil.
15+ public init ? ( rawValue: String ) { self . rawValue = rawValue }
16+ internal init ( _ value: String ) { self . rawValue = value }
2717}
2818
2919/// Options to use when creating a `ChangeStream`.
Original file line number Diff line number Diff line change 6363@_exported import struct MongoSwift. FindOneAndUpdateOptions
6464@_exported import struct MongoSwift. FindOneOptions
6565@_exported import struct MongoSwift. FindOptions
66- @_exported import enum MongoSwift. FullDocument
66+ @_exported import struct MongoSwift. FullDocument
6767@_exported import enum MongoSwift. IndexHint
6868@_exported import struct MongoSwift. IndexModel
6969@_exported import struct MongoSwift. IndexOptions
You can’t perform that action at this time.
0 commit comments