The GitHub Actions job "Unit Tests" on 
pekko-projection.git/port-akka-1017-r2dbc-withsession has succeeded.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
cff140aed2004b17119b8d23f1c66ad313cf64e1 / PJ Fanning 
<[email protected]>
r2dbc: add R2dbcSession.withSession

Motivation:
Users who want to query projected data outside of a projection handler
had to build an R2dbcExecutor (an internal API) to obtain an
R2dbcSession. Akka Projections added R2dbcSession.withSession for this
in akka/akka-projection#1017.

Modification:
Add R2dbcSession.withSession to the scaladsl and javadsl R2dbcSession
companions. It runs the given function with a session on a new
transaction from the configured connection factory (default
pekko.projection.r2dbc.use-connection-factory, or an explicit config
path), committing on success and rolling back on failure. DB call
logging uses the projection's log-db-calls-exceeding setting. The
upstream switch of the javadsl select/selectOne mapRow parameter to
java.util.function.Function is not included, because it would break
binary compatibility. Use withSession in the R2dbcProjectionSpec and
R2dbcTimestampOffsetProjectionSpec test helpers, and document it in
r2dbc.md.

Result:
An R2dbcSession can be obtained through public API in both DSLs.

Tests:
- sbt "r2dbc-int-test/testOnly ...R2dbcSessionSpec ...R2dbcProjectionSpec" 
(Postgres): 36 passed
- sbt "r2dbc-int-test/testOnly ...R2dbcTimestampOffsetProjectionSpec": passed
- New R2dbcSessionSpec covers commit and rollback for both DSLs; before the fix 
it does not compile because the API is new
- sbt r2dbc/mimaReportBinaryIssues (vs 1.0.0): no issues
- sbt docs/paradox, headerCheckAll, scalafmt, git diff --check: ok

References:
Refs akka/akka-projection#1017 
(https://github.com/akka/akka-projection/pull/1017) - source of the ported code

Report URL: https://github.com/apache/pekko-projection/actions/runs/40145644568

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to