 /// Modifiers that are available for use in array update operations.
 ///
 /// - see: https://docs.mongodb.com/manual/reference/operator/update-array/
-public enum ArrayUpdateOperator: Encodable {
-    
-    // These are primarly used within update operators and thus cannot be represented easily here.
-//    case matchFirst(Primitive)
-    
-//    case matchAll(Primitive)
-    
-//    case matchFiltered(Primitive)
-    
+public enum ArrayUpdateOperator: Encodable, PrimitiveConvertible {
     /// The $addToSet operator adds a value to an array unless the value is already present, in which case $addToSet does nothing to that array.
     case addToSet(field: String, Primitive)
     

            
            document = ["$push": [field: pushValue] as Document]
        }
        try document.encode(to: encoder)
    }
}

        case sortDescending(field: String?)
    }
    
    /// Converts the operator to a Document
    private var document: Document {
        let document: Document
        
        switch self {
        case .addToSet(let field, let value):
            document = ["$addToSet": [field: value] as Document]
        case .popFirst(let field):
