mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-15 09:53:01 -06:00
[chore] bump db dependencies (#1366)
This commit is contained in:
parent
b375d3b5d6
commit
0ceacd7b1d
78 changed files with 141878 additions and 126068 deletions
13
vendor/github.com/uptrace/bun/hook.go
generated
vendored
13
vendor/github.com/uptrace/bun/hook.go
generated
vendored
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue