Skip to content

Commit 8b6c445

Browse files
committed
Convert VisibilitySearchAttributes to string
You can't interpolate a []byte into a JSON field: go-sql-driver/mysql#819
1 parent d1332c4 commit 8b6c445

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

common/persistence/sql/sqlplugin/visibility.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ func (vsa VisibilitySearchAttributes) Value() (driver.Value, error) {
150150
if vsa == nil {
151151
return nil, nil
152152
}
153-
return json.Marshal(vsa)
153+
bs, err := json.Marshal(vsa)
154+
if err != nil {
155+
return nil, err
156+
}
157+
return string(bs), nil
154158
}
155159

156160
func ParseCountGroupByRows(rows *sql.Rows, groupBy []string) ([]VisibilityCountRow, error) {

0 commit comments

Comments
 (0)