ReadConcern

public class ReadConcern : Codable

A class to represent a MongoDB read concern.

  • An enumeration of possible ReadConcern levels.

    See more

    Declaration

    Swift

    public enum Level : String
  • The level of this ReadConcern, or nil if the level is not set.

    Declaration

    Swift

    public var level: String? { get }
  • Indicates whether this ReadConcern is the server default.

    Declaration

    Swift

    public var isDefault: Bool { get }
  • Initialize a new ReadConcern from a ReadConcern.Level.

    Declaration

    Swift

    public convenience init(_ level: Level)
  • Initialize a new ReadConcern from a String corresponding to a read concern level.

    Declaration

    Swift

    public init(_ level: String)
  • Initialize a new empty ReadConcern.

    Declaration

    Swift

    public init()
  • Initializes a new ReadConcern from a Document.

    Declaration

    Swift

    public convenience init(_ doc: Document)
  • Initializes a new ReadConcern by copying an existing ReadConcern.

    Declaration

    Swift

    public init(from readConcern: ReadConcern)
  • Declaration

    Swift

    public required convenience init(from decoder: Decoder) throws
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws
  • Returns the relaxed extended JSON representation of this ReadConcern. On error, an empty string will be returned.

    Declaration

    Swift

    public var description: String { get }
  • Declaration

    Swift

    public static func == (lhs: ReadConcern, rhs: ReadConcern) -> Bool