chore: ⬆️ updated deps
This commit is contained in:
+22
@@ -13,6 +13,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang-sql/civil"
|
||||
"github.com/microsoft/go-mssqldb/msdsn"
|
||||
)
|
||||
|
||||
@@ -279,6 +280,12 @@ func (tvp TVP) createZeroType(fieldVal interface{}) interface{} {
|
||||
return defaultInt64
|
||||
case sql.NullString:
|
||||
return defaultString
|
||||
case NullDate:
|
||||
return civil.Date{}
|
||||
case NullDateTime:
|
||||
return civil.DateTime{}
|
||||
case NullTime:
|
||||
return civil.Time{}
|
||||
}
|
||||
return fieldVal
|
||||
}
|
||||
@@ -310,6 +317,21 @@ func (tvp TVP) verifyStandardTypeOnNull(buf *bytes.Buffer, tvpVal interface{}) b
|
||||
binary.Write(buf, binary.LittleEndian, uint64(_PLP_NULL))
|
||||
return true
|
||||
}
|
||||
case NullDate:
|
||||
if !val.Valid {
|
||||
binary.Write(buf, binary.LittleEndian, defaultNull)
|
||||
return true
|
||||
}
|
||||
case NullDateTime:
|
||||
if !val.Valid {
|
||||
binary.Write(buf, binary.LittleEndian, defaultNull)
|
||||
return true
|
||||
}
|
||||
case NullTime:
|
||||
if !val.Valid {
|
||||
binary.Write(buf, binary.LittleEndian, defaultNull)
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user