Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R2DBC Testing #2430

Open
wants to merge 1 commit into
base: bog-walk/fix-metadata
Choose a base branch
from
Open

Conversation

obabichevjb
Copy link
Collaborator

Description

Since this PR is not into the r2dbc-poc-2 but into fix-metadata branch it's not supposed to be merged, and more for questions and review.

I tried to adopt some tests from exposed-tests to exposed-r2dbc-tests, and faced several issues:

  • Double inserts - every insert happends twice, it's related to current work with flow. We've already discussed it, but anyway it's still problem. I was able to workaround it (at least for insert statements), but not sure how the proper variant should look like, so it's not here
  • Problems with transaction manager. Am I right that at the current moment only the code from exposed-r2dbc has access to the r2dbc transaction manager, and the code from the core module still tries to get thread local transaction, and fails for r2dbc?

@obabichevjb obabichevjb requested review from bog-walk and e5l February 25, 2025 12:45
Copy link
Member

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check the comments

@@ -1,4 +1,4 @@
package org.jetbrains.exposed.sql.tests.demo
package org.jetbrains.exposed.sql.exposed.r2dbc.tests.demo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we drop second exposed?

@@ -292,6 +292,7 @@ suspend fun <Key : Any, T : IdTable<Key>> T.insertIgnoreAndGetId(
): EntityID<Key>? {
val stmt = StatementBuilder { insertIgnore(body) }
return InsertExecutable<Long, InsertStatement<Long>>(stmt).run {
// TODO TransactionManager.current() fails here
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you tell me if changes from @bog-walk branch will fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants