[chore] bump db dependencies (#1366)

This commit is contained in:
tobi 2023-01-22 12:26:47 +01:00 committed by GitHub
commit 0ceacd7b1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 141878 additions and 126068 deletions

View file

@ -6,6 +6,7 @@ import (
"strings"
"sync/atomic"
"time"
"unicode"
"github.com/uptrace/bun/schema"
)
@ -35,13 +36,15 @@ func (e *QueryEvent) Operation() string {
}
func queryOperation(query string) string {
if idx := strings.IndexByte(query, ' '); idx > 0 {
query = query[:idx]
queryOp := strings.TrimLeftFunc(query, unicode.IsSpace)
if idx := strings.IndexByte(queryOp, ' '); idx > 0 {
queryOp = queryOp[:idx]
}
if len(query) > 16 {
query = query[:16]
if len(queryOp) > 16 {
queryOp = queryOp[:16]
}
return query
return queryOp
}
type QueryHook interface {