-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fail fast if query has multiple statements #57
Comments
|
@jiawen-tw Cool, didn't know that existed! |
This reverts commit d3b7913 - reverting for now, as this change appears to be breaking the batching.
Had to revert and re-open this as the earlier solution seemed to be interfering with the batching and breaking the reactive chain somehow. Current theory is that it has exposed that we are missing a unit test that ensures things work when there are batches in place. If not strictly due to the batching, the switch to Observed behaviour is that even with a single query, the reactive chain just dies/disappears with no feedback to the user. The HTTP request just blocks. This can be tested manually using the |
For some reason using `.single().flatMapMany()` seems to cause the Flux to get stuck sometimes, perhaps related to batching. This seems to work, although it's not really failing "fast" since it still has to execute the queries and it may have partially inserted some data for the original statement. Nonetheless, it does work sufficiently for now.
Context / Goal
Technically the current implementation probably allows multiple statements to be expressed inside the queries, and will be executed.
This shouldn't be allowed and should ideally fail at execution, however as noted in #56, we don't actually have capacity to do SQL parsing - this is delegated to the database and/or drivers.
Expected Outcome
;
Flux<Result>
might mean it blindly tries to continue and produces weird output..singleOrEmpty()
or.toMono()
but I'm not sure what the difference is between these two approaches and haven't tried itOut of Scope
Additional context / implementation notes
The text was updated successfully, but these errors were encountered: