[chore]: Bump github.com/uptrace/bun/dialect/pgdialect

Bumps [github.com/uptrace/bun/dialect/pgdialect](https://github.com/uptrace/bun) from 1.2.9 to 1.2.10.
- [Release notes](https://github.com/uptrace/bun/releases)
- [Changelog](https://github.com/uptrace/bun/blob/v1.2.10/CHANGELOG.md)
- [Commits](https://github.com/uptrace/bun/compare/v1.2.9...v1.2.10)

---
updated-dependencies:
- dependency-name: github.com/uptrace/bun/dialect/pgdialect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2025-02-24 06:54:55 +00:00 committed by GitHub
commit 8d167498f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 487 additions and 209 deletions

View file

@ -142,6 +142,10 @@ func (d *Dialect) arrayElemAppender(typ reflect.Type) schema.AppenderFunc {
if typ.Implements(driverValuerType) {
return arrayAppendDriverValue
}
if typ == timeType {
return appendTimeElemValue
}
switch typ.Kind() {
case reflect.String:
return appendStringElemValue
@ -149,10 +153,20 @@ func (d *Dialect) arrayElemAppender(typ reflect.Type) schema.AppenderFunc {
if typ.Elem().Kind() == reflect.Uint8 {
return appendBytesElemValue
}
case reflect.Ptr:
return schema.PtrAppender(d.arrayElemAppender(typ.Elem()))
}
return schema.Appender(d, typ)
}
func appendTimeElemValue(fmter schema.Formatter, b []byte, v reflect.Value) []byte {
ts := v.Convert(timeType).Interface().(time.Time)
b = append(b, '"')
b = appendTime(b, ts)
return append(b, '"')
}
func appendStringElemValue(fmter schema.Formatter, b []byte, v reflect.Value) []byte {
return appendStringElem(b, v.String())
}