summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/extra
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-01-14 14:23:28 +0000
committerLibravatar GitHub <noreply@github.com>2025-01-14 14:23:28 +0000
commitb8ef9fc4bcccc6c024edaa8e9c91a6bf87f83dd9 (patch)
tree68eaf966c80237e18993e887c8583355f0943ca7 /vendor/github.com/uptrace/bun/extra
parent[chore] better dns validation (#3644) (diff)
downloadgotosocial-b8ef9fc4bcccc6c024edaa8e9c91a6bf87f83dd9.tar.xz
bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645)
Diffstat (limited to 'vendor/github.com/uptrace/bun/extra')
-rw-r--r--vendor/github.com/uptrace/bun/extra/bunotel/otel.go3
-rw-r--r--vendor/github.com/uptrace/bun/extra/bunotel/safe.go11
-rw-r--r--vendor/github.com/uptrace/bun/extra/bunotel/unsafe.go20
3 files changed, 2 insertions, 32 deletions
diff --git a/vendor/github.com/uptrace/bun/extra/bunotel/otel.go b/vendor/github.com/uptrace/bun/extra/bunotel/otel.go
index d0672e7c2..66b88e989 100644
--- a/vendor/github.com/uptrace/bun/extra/bunotel/otel.go
+++ b/vendor/github.com/uptrace/bun/extra/bunotel/otel.go
@@ -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)
diff --git a/vendor/github.com/uptrace/bun/extra/bunotel/safe.go b/vendor/github.com/uptrace/bun/extra/bunotel/safe.go
deleted file mode 100644
index fab151a78..000000000
--- a/vendor/github.com/uptrace/bun/extra/bunotel/safe.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// +build appengine
-
-package internal
-
-func bytesToString(b []byte) string {
- return string(b)
-}
-
-func stringToBytes(s string) []byte {
- return []byte(s)
-}
diff --git a/vendor/github.com/uptrace/bun/extra/bunotel/unsafe.go b/vendor/github.com/uptrace/bun/extra/bunotel/unsafe.go
deleted file mode 100644
index 67b687cbe..000000000
--- a/vendor/github.com/uptrace/bun/extra/bunotel/unsafe.go
+++ /dev/null
@@ -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))
-}