// Value implements the driver Valuer interface.
356965
func (f Float64) Value() (driver.Value, error) {
	if !f.Valid {
		return nil, nil
	}
	return f.Float64, nil
}
348768
func (n NullInt32) Value() (driver.Value, error) {
	if n.Valid {
		return n.Int32, nil
	}
	return nil, nil
}
309273
func (b Base) Value() (driver.Value, error) {
	if b.Delete {
		return nil, nil
	}

	results, err := json.Marshal(b)
	return string(results), err
}
234782
func (t TimeDefLocal) Value() (driver.Value, error) {
	return t.T.Local(), nil
}
104493
func (a UInt64Array) Value() (driver.Value, error) {
	if a == nil {
		return nil, nil
	}

	if n := len(a); n > 0 {
		// There will be at least two curly brackets, N bytes of values,
		// and N-1 bytes of delimiters.
		b := make([]byte, 1, 1+2*n)
		b[0] = '{'

		b = strconv.AppendUint(b, a[0], 10)
		for i := 1; i < n; i++ {
			b = append(b, ',')
			b = strconv.AppendUint(b, a[i], 10)
		}

		return string(append(b, '}')), nil
	}

	return "{}", nil
}
1096117
func (c *Context) Value(key fmt.Stringer) interface{} {
	value := c.values[key]
	return value
}
135346
func (p VinTxPropertyARRAY) Value() (driver.Value, error) {
	j, err := json.Marshal(p)
	return j, err
}
1187539
func (sa StringArray) Value() (driver.Value, error) {
	if !sa.Valid {
		return nil, nil
	}

	return StringArrayValue(sa.StringArray)
}
609590
func (ns NullTime) Value() (driver.Value, error) {
	if (time.Time)(ns).IsZero() {
		return nil, nil
	}
	return (time.Time)(ns).Format("2006-01-02 15:04:05"), nil
}
645979
func (src *Numeric) Value() (driver.Value, error) {
	switch src.Status {
	case pgtype.Present:
		return src.Decimal.Value()
	case pgtype.Null:
		return nil, nil
	default:
		return nil, errUndefined
	}
}
715944
func (src *Float8) Value() (driver.Value, error) {
	switch src.Status {
	case Present:
		return src.Float, nil
	case Null:
		return nil, nil
	default:
		return nil, errUndefined
	}
}
1296362
func (s *SyncString) Value() string {
	s.Lock()
	defer s.Unlock()
	return s.string
}
1106842
func (p *Point) Value() (driver.Value, error) {
	if p.Point == nil {
		return nil, nil
	}
	return value(p.Point)
}
1063983
func (u Uint64Slice) Value() (driver.Value, error) {
	var ss []string
	for i := 0; i < len(u); i++ {
		tmp := strconv.FormatUint(u[i], 10)
		ss = append(ss, tmp)
	}
	return "{" + strings.Join(ss, ",") + "}", nil
}
1112916
func (s String) Value() (driver.Value, error) {
	ss := pq.StringArray(s)
	return ss.Value()
}
282571
func (s String) Value() (driver.Value, error) {
	if !s.Valid {
		return nil, nil
	}
	return s.Chars, nil
}
61104
func (t SQLStringSliceJSON) Value() (value driver.Value, err error) {
	return SQLValueJSON(t)
}