ReadConcern

public enum ReadConcern: String, ValueConvertible

Used for sharded clusers and replica sets.

Determines which data to return from a query

https://docs.mongodb.com/manual/reference/read-concern/#readconcern.

  • The query returns the instance’s most recent data. Provides no guarantee that the data has been written to a majority of the replica set members

    Declaration

    Swift

    case local
  • The query returns the instance’s most recent data acknowledged as having been written to a majority of members in the replica set.

    Declaration

    Swift

    case majority
  • The query returns data that reflects all successful writes issued with a write concern of majority and acknowledged prior to the start of the read operation.

    Declaration

    Swift

    case linearizable
  • Converts this object to a BSON.Primitive

    Declaration

    Swift

    public func makePrimitive() -> BSON.Primitive