@@ -114,7 +114,7 @@ func (bw *bulkWrite) runBatch(ctx context.Context, batch bulkWriteBatch) (BulkWr
114114 batchErr .Labels = writeErr .Labels
115115 batchErr .WriteConcernError = convertDriverWriteConcernError (writeErr .WriteConcernError )
116116 }
117- batchRes .InsertedCount = int64 ( res .N )
117+ batchRes .InsertedCount = res .N
118118 case * DeleteOneModel , * DeleteManyModel :
119119 res , err := bw .runDelete (ctx , batch )
120120 if err != nil {
@@ -126,7 +126,7 @@ func (bw *bulkWrite) runBatch(ctx context.Context, batch bulkWriteBatch) (BulkWr
126126 batchErr .Labels = writeErr .Labels
127127 batchErr .WriteConcernError = convertDriverWriteConcernError (writeErr .WriteConcernError )
128128 }
129- batchRes .DeletedCount = int64 ( res .N )
129+ batchRes .DeletedCount = res .N
130130 case * ReplaceOneModel , * UpdateOneModel , * UpdateManyModel :
131131 res , err := bw .runUpdate (ctx , batch )
132132 if err != nil {
@@ -138,8 +138,8 @@ func (bw *bulkWrite) runBatch(ctx context.Context, batch bulkWriteBatch) (BulkWr
138138 batchErr .Labels = writeErr .Labels
139139 batchErr .WriteConcernError = convertDriverWriteConcernError (writeErr .WriteConcernError )
140140 }
141- batchRes .MatchedCount = int64 ( res .N )
142- batchRes .ModifiedCount = int64 ( res .NModified )
141+ batchRes .MatchedCount = res .N
142+ batchRes .ModifiedCount = res .NModified
143143 batchRes .UpsertedCount = int64 (len (res .Upserted ))
144144 for _ , upsert := range res .Upserted {
145145 batchRes .UpsertedIDs [int64 (batch .indexes [upsert .Index ])] = upsert .ID
0 commit comments