Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2004

gridfs.GridFS.delete should return a DeleteResult

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API, GridFS
    • None

      Reported in this github PR:

      pymongo.Collection.delete_one returns a DeleteResult object which, among other things, provides the deleted_count attribute telling whether or not anything was actually deleted by the call. However, gridfs.GridFS.delete returns nothing regardless if a document is deleted. This PR changes the behavior of GridFS to more closely follow Collection by returning the DeleteResult from the underlying call to delete the document index.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: