MCPcopy Create free account
hub / github.com/uptrace/bun / decodeStringSlice

Function decodeStringSlice

dialect/pgdialect/array.go:429–450  ·  view source on GitHub ↗
(src any)

Source from the content-addressed store, hash-verified

427}
428
429func decodeStringSlice(src any) ([]string, error) {
430 if src == nil {
431 return nil, nil
432 }
433
434 b, err := toBytes(src)
435 if err != nil {
436 return nil, err
437 }
438
439 slice := make([]string, 0)
440
441 p := newArrayParser(b)
442 for p.Next() {
443 elem := p.Elem()
444 slice = append(slice, string(elem))
445 }
446 if err := p.Err(); err != nil {
447 return nil, err
448 }
449 return slice, nil
450}
451
452func scanIntSliceValue(dest reflect.Value, src any) error {
453 dest = reflect.Indirect(dest)

Callers 1

scanStringSliceValueFunction · 0.85

Calls 5

newArrayParserFunction · 0.85
ElemMethod · 0.80
toBytesFunction · 0.70
NextMethod · 0.45
ErrMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…