Fix ordering of message queue messages#723
Open
shueybubbles wants to merge 4 commits intodenisenkom:masterfrom
Open
Fix ordering of message queue messages#723shueybubbles wants to merge 4 commits intodenisenkom:masterfrom
shueybubbles wants to merge 4 commits intodenisenkom:masterfrom
Conversation
This was referenced Feb 28, 2022
Codecov Report
@@ Coverage Diff @@
## master #723 +/- ##
==========================================
- Coverage 71.29% 71.21% -0.09%
==========================================
Files 24 24
Lines 5386 5412 +26
==========================================
+ Hits 3840 3854 +14
- Misses 1301 1312 +11
- Partials 245 246 +1
Continue to review full report at Codecov.
|
shueybubbles
commented
Mar 3, 2022
| } else { | ||
| switch tokdata := tok.(type) { | ||
| case doneInProcStruct: | ||
| tok = (doneStruct)(tokdata) |
Contributor
Author
There was a problem hiding this comment.
is there a more idiomatic way to combine the handling of doneInProcStruct and doneStruct?
Contributor
Author
|
@kardianos hi can you look at this one? I need it to unblock go-sqlcmd. thx |
This was referenced Apr 4, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to keep the reader channel unblocked we have to handle every
doneanddoneInProctoken by sending aMsgNextResult.I am tempted to combine the token read and switch statements in
rowsQ.NextResultandrowsQ.Nextinto a common helper but I don't think it will add much value. Also, as TDS evolves, they may need to diverge in behavior at some point. As written, it's fairly clear which token types each function expects to see in the stream.