supporting of ReturnDocument in BulkWriteOptions when doing bulk operation

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.1.3
    • Component/s: API, CRUD
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      when we are making db API call for set of Document to update at once in bulk write API. Then can we pass one flag  for returning new Document when update done.

      BulkWriteOptions.returnDocument

       

      for _, msg := range listOfData

      { operation := mongo.NewUpdateOneModel() operation.SetFilter(bson.M\{"_id": msgbyte.Id}

      )
      operation.SetUpdate(bson.M{"$set": bson.M{}})
      operation.SetUpsert(false)
      operations = append(operations, operation)
      }

      bulkOption := options.BulkWriteOptions{}

      BulkWriteOptions.returnDocument

      bulkWriteResponse,err:=t.collection(ctx,operations,bulkOption)

              Assignee:
              Isabella Siu (Inactive)
              Reporter:
              DHARMADEV gupta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: