Skip to content

Commit 242ee8e

Browse files
committed
fix: executeUpdate response sum from matched, delete and inserted count
1 parent 90f867b commit 242ee8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/dev/mongocamp/driver/mongodb/jdbc/statement/MongoPreparedStatement.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ case class MongoPreparedStatement(connection: MongoJdbcConnection) extends Calla
373373
checkClosed()
374374
val updateResponse = executeQuery(sql)
375375
updateResponse.next()
376-
val updateCount = updateResponse.getInt("matchedCount")
376+
val updateCount = updateResponse.getInt("matchedCount") + updateResponse.getInt("deletedCount") + updateResponse.getInt("insertedCount")
377377
_lastUpdateCount = updateCount
378378
updateCount
379379
}

0 commit comments

Comments
 (0)