MCPcopy Index your code
hub / github.com/aarondl/sqlboiler / Value

Method Value

types/array.go:1058–1071  ·  view source on GitHub ↗

Value implements the driver.Valuer interface.

()

Source from the content-addressed store, hash-verified

1056
1057// Value implements the driver.Valuer interface.
1058func (a DecimalArray) Value() (driver.Value, error) {
1059 if a == nil {
1060 return nil, nil
1061 } else if len(a) == 0 {
1062 return "{}", nil
1063 }
1064
1065 strs := make([]string, len(a))
1066 for i, d := range a {
1067 strs[i] = d.String()
1068 }
1069
1070 return "{" + strings.Join(strs, ",") + "}", nil
1071}
1072
1073// Randomize for sqlboiler
1074func (a *DecimalArray) Randomize(nextInt func() int64, fieldType string, shouldBeNull bool) {

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected