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

Adopt R2DBC changes which do not always send a value #3525

Merged
merged 4 commits into from Sep 22, 2022
Merged

Conversation

hfhbd
Copy link
Collaborator

@hfhbd hfhbd commented Sep 22, 2022

The new 1.0.0 release does not send a value when executing a sql statement (eg create a database). Instead, the Publisher is finished without a value, thus awaitSingle fails. Preparation for #3375 which will enable the R2DBC tests.

@hfhbd hfhbd changed the title Adopt R2DBC changes which does not always send a value Adopt R2DBC changes which do not always send a value Sep 22, 2022
val rowSet = mutableListOf<Map<Int, Any?>>()
result.map { row, rowMetadata ->
rowSet.add(rowMetadata.columnMetadatas.mapIndexed { index, _ -> index to row.get(index) }.toMap())
}.awaitLast()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

awaitLast requires at least one item, but this does not work if your result is empty, eg because the query does not return any rows.

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.

None yet

3 participants