pjfanning commented on code in PR #92:
URL: 
https://github.com/apache/pekko-persistence-r2dbc/pull/92#discussion_r1617744490


##########
core/src/main/scala/org/apache/pekko/persistence/r2dbc/state/scaladsl/DurableStateDao.scala:
##########
@@ -281,6 +284,28 @@ private[r2dbc] class DurableStateDao(settings: 
R2dbcSettings, connectionFactory:
     result.map(_ => Done)(ExecutionContexts.parasitic)
   }
 
+  /**
+   * @param persistenceId The persistence id for the object
+   * @param revision The revision to delete
+   * @return The number of rows deleted
+   * @since 1.1.0
+   */
+  def deleteStateForRevision(persistenceId: String, revision: Long): 
Future[Long] = {
+    val result =
+      r2dbcExecutor.updateOne(s"delete [$persistenceId, $revision]") { 
connection =>
+        connection
+          .createStatement(deleteStateWithRevisionSql)
+          .bind(0, persistenceId)
+          .bind(1, revision)
+      }
+
+    if (log.isDebugEnabled())
+      result.foreach(_ =>

Review Comment:
   I've added the deleteCount to the log message



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to