mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 21:22:24 -05:00
bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645)
This commit is contained in:
parent
e77c7e16b6
commit
b8ef9fc4bc
89 changed files with 907 additions and 4123 deletions
3
vendor/github.com/uptrace/bun/extra/bunotel/otel.go
generated
vendored
3
vendor/github.com/uptrace/bun/extra/bunotel/otel.go
generated
vendored
|
@ -16,6 +16,7 @@ import (
|
|||
|
||||
"github.com/uptrace/bun"
|
||||
"github.com/uptrace/bun/dialect"
|
||||
"github.com/uptrace/bun/internal"
|
||||
"github.com/uptrace/bun/schema"
|
||||
"github.com/uptrace/opentelemetry-go-extra/otelsql"
|
||||
)
|
||||
|
@ -169,7 +170,7 @@ func (h *QueryHook) eventQuery(event *bun.QueryEvent) string {
|
|||
func unformattedQuery(event *bun.QueryEvent) string {
|
||||
if event.IQuery != nil {
|
||||
if b, err := event.IQuery.AppendQuery(schema.NewNopFormatter(), nil); err == nil {
|
||||
return bytesToString(b)
|
||||
return internal.String(b)
|
||||
}
|
||||
}
|
||||
return string(event.QueryTemplate)
|
||||
|
|
11
vendor/github.com/uptrace/bun/extra/bunotel/safe.go
generated
vendored
11
vendor/github.com/uptrace/bun/extra/bunotel/safe.go
generated
vendored
|
@ -1,11 +0,0 @@
|
|||
// +build appengine
|
||||
|
||||
package internal
|
||||
|
||||
func bytesToString(b []byte) string {
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func stringToBytes(s string) []byte {
|
||||
return []byte(s)
|
||||
}
|
20
vendor/github.com/uptrace/bun/extra/bunotel/unsafe.go
generated
vendored
20
vendor/github.com/uptrace/bun/extra/bunotel/unsafe.go
generated
vendored
|
@ -1,20 +0,0 @@
|
|||
//go:build !appengine
|
||||
// +build !appengine
|
||||
|
||||
package bunotel
|
||||
|
||||
import "unsafe"
|
||||
|
||||
func bytesToString(b []byte) string {
|
||||
if len(b) == 0 {
|
||||
return ""
|
||||
}
|
||||
return unsafe.String(&b[0], len(b))
|
||||
}
|
||||
|
||||
func stringToBytes(s string) []byte {
|
||||
if s == "" {
|
||||
return []byte{}
|
||||
}
|
||||
return unsafe.Slice(unsafe.StringData(s), len(s))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue