Repository navigation
refactor: generate request payloads using generator functions - #1037
Merged
Merged
Conversation
This was referenced Jan 17, 2020
Inserts into varbinary(max) col with FILESTREAM or reads from that column takes 10's of seconds
#971
Closed
Codecov Report
@@ Coverage Diff @@
## master #1037 +/- ##
=========================================
Coverage ? 80.23%
=========================================
Files ? 86
Lines ? 4397
Branches ? 780
=========================================
Hits ? 3528
Misses ? 614
Partials ? 255
Continue to review full report at Codecov.
|
IanChokS
force-pushed
the
refactor-buffer
branch
from
January 23, 2020 17:53
f18b0c2 to
d0c8972
Compare
Collaborator
|
🎉 This PR is included in version 8.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
When parameters or bulk load rows are converted from JavaScript values to actual TDS request payload data, a method called
writeParameterDatais currently used.This method takes a
WritableTrackingBufferargument and stores the converted data type information in this tracking buffer. As part of #1038, we want to move to a model where this parameter data is not fully stored in oneWritableTrackingBufferbefore a request is written to the network, but instead we want to generate data in a streaming fashion and start sending data over the network as soon as possible.This changeset adds a new
generategenerator method to all data types, which generates individualBuffers containing the same data as has been written byWritableTrackingBufferso far.writeParameterDatamethods were update to make use of the generator objects returned bygenerate, until all of the request payload generation functionality gets updated to make use of the generator objects directly.