Skip to content

Commit 6124c8f

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

common/persistence/sql/sqlplugin/visibility.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ func (vsa VisibilitySearchAttributes) Value() (driver.Value, error) {
145145
if vsa == nil {
146146
return nil, nil
147147
}
148-
return json.Marshal(vsa)
148+
bs, err := json.Marshal(vsa)
149+
if err != nil {
150+
return nil, err
151+
}
152+
return string(bs), nil
149153
}
150154

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

0 commit comments

Comments
 (0)