ProjectionExpression

public enum ProjectionExpression: ValueConvertible, ExpressibleByBooleanLiteral, ExpressibleByStringLiteral, ExpressibleByDictionaryLiteral

An expression that can be specified to either include or exclude a field (or some custom value)

  • Creates a BSON.Primitive of this ProjecitonExpression for easy embedding in Documents

    Declaration

    Swift

    public func makePrimitive() -> BSON.Primitive
  • A dictionary literal that makes this a custom ProjectionExpression

    Declaration

    Swift

    public init(stringLiteral value: String)
  • A dictionary literal that makes this a custom ProjectionExpression

    Declaration

    Swift

    public init(unicodeScalarLiteral value: String)
  • A dictionary literal that makes this a custom ProjectionExpression

    Declaration

    Swift

    public init(extendedGraphemeClusterLiteral value: String)
  • Includes when true, Excludes when false

    Declaration

    Swift

    public init(booleanLiteral value: Bool)
  • A dictionary literal that makes this a custom ProjectionExpression

    Declaration

    Swift

    public init(dictionaryLiteral elements: (String, BSON.Primitive?)...)
  • A custom projection value

    Declaration

    Swift

    case custom(BSON.Primitive)
  • Includes this field in the projection

    Declaration

    Swift

    case included
  • Excludes this field from the projection

    Declaration

    Swift

    case excluded