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

fix: Allow exec() transform block to return null if ResultSet is empty #1696

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

micheljung
Copy link
Contributor

If the ResultSet contains no result, the user wants to return null. However, since executeQuery() returns a non-nullable ResultSet, the user is forced to return a non-null object, even if there is no result.

By allowing transform to return null, this is fixed.

@joc-a
Copy link
Collaborator

joc-a commented Jul 13, 2023

Hi @micheljung. Thank you for your contribution. Could you please add a test that covers this change?

@bog-walk bog-walk self-assigned this Jan 15, 2024
micheljung and others added 2 commits January 15, 2024 19:33
If the ResultSet contains no result, the user wants to return `null`.
However, since `executeQuery()` returns a non-nullable ResultSet, the user is
forced to return a non-null object, even if there is no result.

By allowing `transform` to return null, this is fixed.
@bog-walk bog-walk changed the title Fix nullability of Transaction.exec()' transform fix: Allow exec() transform block to return null if ResultSet is empty Jan 16, 2024
@bog-walk bog-walk requested a review from e5l January 16, 2024 00:50
@bog-walk bog-walk merged commit 551f62c into JetBrains:main Jan 17, 2024
3 checks passed
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.

4 participants