Expression

public enum Expression: ValueConvertible

The expressions are currently only supporting literals.

  • A literal value

    Any String starting with a $ will be seen as a pointer to a Document key. In this case the value at that key will be used instead.

    Declaration

    Swift

    case literal(BSON.Primitive)
  • Converts an expression to a BSON.Primitive for easy embedding in Documents

    Declaration

    Swift

    public func makePrimitive() -> BSON.Primitive