mirror of
https://github.com/VinGarcia/ksql.git
synced 2025-05-31 11:42:25 +00:00
Add comment to json modifier
This commit is contained in:
parent
136ee66fe9
commit
ad516d5e1f
@ -29,6 +29,8 @@ var jsonModifier = AttrModifier{
|
||||
|
||||
Value: func(ctx context.Context, opInfo OpInfo, inputValue interface{}) (outputValue interface{}, _ error) {
|
||||
b, err := json.Marshal(inputValue)
|
||||
// SQL server uses the NVARCHAR type to store JSON and
|
||||
// it expects to receive strings not []byte, thus:
|
||||
if opInfo.DriverName == "sqlserver" {
|
||||
return string(b), err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user