Skip to content

Commit

Permalink
Merge pull request uptrace#768 from a-mehrabi/fix/mssql-dialect-unicode
Browse files Browse the repository at this point in the history
Add support for inserting string values with unicode encoding for MSSQL Dialect
  • Loading branch information
vmihailenco authored Jan 30, 2023
2 parents eab19a5 + e98c6c0 commit 4493bba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dialect/mssqldialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ func (*Dialect) AppendBool(b []byte, v bool) []byte {
return strconv.AppendUint(b, uint64(num), 10)
}

func (d *Dialect) AppendString(b []byte, s string) []byte {
b = append(b, 'N')
return d.BaseDialect.AppendString(b, s)
}

func (d *Dialect) DefaultVarcharLen() int {
return 255
}
Expand Down

0 comments on commit 4493bba

Please sign in to comment.