No return type for InsertOne and InsertMany

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major - P3
    • 4.0.0
    • Affects Version/s: None
    • Component/s: API
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Hi 

      Please can you review the following for a future improvement:

      InsertOne(), InsertOneAsync(), InsertMany(), InsertManyAsync() methods do not return anything.  They should return something I would expect an object based on the other methods below:

      DeleteOne and DeleteOneAsync() returns a DeleteResult object 

      UpdateOne and UpdateOneAsync() returns an UpdateResult object

       

      I have worked around this using the BulkInsert/BulkInsertResult but the above insert methods should return an InsertResult object.

      The Java driver does return an InsertResult object.

       

      Many thanks

            Assignee:
            Unassigned
            Reporter:
            Nick Parker
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: