@@ -114,7 +114,7 @@ func (bw *bulkWrite) runBatch(ctx context.Context, batch bulkWriteBatch) (BulkWr
114
114
batchErr .Labels = writeErr .Labels
115
115
batchErr .WriteConcernError = convertDriverWriteConcernError (writeErr .WriteConcernError )
116
116
}
117
- batchRes .InsertedCount = int64 ( res .N )
117
+ batchRes .InsertedCount = res .N
118
118
case * DeleteOneModel , * DeleteManyModel :
119
119
res , err := bw .runDelete (ctx , batch )
120
120
if err != nil {
@@ -126,7 +126,7 @@ func (bw *bulkWrite) runBatch(ctx context.Context, batch bulkWriteBatch) (BulkWr
126
126
batchErr .Labels = writeErr .Labels
127
127
batchErr .WriteConcernError = convertDriverWriteConcernError (writeErr .WriteConcernError )
128
128
}
129
- batchRes .DeletedCount = int64 ( res .N )
129
+ batchRes .DeletedCount = res .N
130
130
case * ReplaceOneModel , * UpdateOneModel , * UpdateManyModel :
131
131
res , err := bw .runUpdate (ctx , batch )
132
132
if err != nil {
@@ -138,8 +138,8 @@ func (bw *bulkWrite) runBatch(ctx context.Context, batch bulkWriteBatch) (BulkWr
138
138
batchErr .Labels = writeErr .Labels
139
139
batchErr .WriteConcernError = convertDriverWriteConcernError (writeErr .WriteConcernError )
140
140
}
141
- batchRes .MatchedCount = int64 ( res .N )
142
- batchRes .ModifiedCount = int64 ( res .NModified )
141
+ batchRes .MatchedCount = res .N
142
+ batchRes .ModifiedCount = res .NModified
143
143
batchRes .UpsertedCount = int64 (len (res .Upserted ))
144
144
for _ , upsert := range res .Upserted {
145
145
batchRes .UpsertedIDs [int64 (batch .indexes [upsert .Index ])] = upsert .ID
0 commit comments