mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-24 08:56:14 -06:00
[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:
parent
c9de6c9a1e
commit
8d167498f8
34 changed files with 487 additions and 209 deletions
14
vendor/github.com/uptrace/bun/dialect/pgdialect/array.go
generated
vendored
14
vendor/github.com/uptrace/bun/dialect/pgdialect/array.go
generated
vendored
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue