Open
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #239 +/- ##
==========================================
+ Coverage 74.77% 74.98% +0.21%
==========================================
Files 32 32
Lines 6457 6540 +83
==========================================
+ Hits 4828 4904 +76
- Misses 1338 1343 +5
- Partials 291 293 +2 ☔ View full report in Codecov by Sentry. |
shueybubbles
reviewed
Mar 4, 2025
shueybubbles
reviewed
Mar 4, 2025
shueybubbles
reviewed
Mar 4, 2025
shueybubbles
reviewed
Mar 4, 2025
| } | ||
| func writeLongLenType(w io.Writer, ti typeInfo, buf []byte) (err error) { | ||
| if buf == nil { | ||
| // According to the documentation, we MUST NOT specify the text pointer and timestamp when the value is NULL. |
Collaborator
There was a problem hiding this comment.
would it be worthwhile to have a non-bulkinsert test case for this? #Resolved
Author
There was a problem hiding this comment.
@shueybubbles I don’t see any insert tests anywhere…
Besides, this code won’t run in non-bulkinsert scenario because:
func (s *Stmt) makeParam(val driver.Value) (res param, err error) {
if val == nil {
res.ti.TypeId = typeNull
res.buffer = nil
res.ti.Size = 0
return
}
...And then
func writeTypeInfo(w io.Writer, ti *typeInfo, out bool, encoding msdsn.EncodeParameters) (err error) {
err = binary.Write(w, binary.LittleEndian, ti.TypeId)
if err != nil {
return
}
switch ti.TypeId {
case typeNull, typeInt1, typeBit, typeInt2, typeInt4, typeDateTim4,
typeFlt4, typeMoney, typeDateTime, typeFlt8, typeMoney4, typeInt8:
// those are fixed length
// https://msdn.microsoft.com/en-us/library/dd341171.aspx
ti.Writer = writeFixedType
...
Author
|
@microsoft-github-policy-service agree |
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.
No description provided.