mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-15 09:23:01 -06:00
upstep bun to v1.0.14 (#291)
This commit is contained in:
parent
84a8a07f38
commit
8b7c3507fe
100 changed files with 5071 additions and 3836 deletions
22
vendor/github.com/uptrace/bun/hook.go
generated
vendored
22
vendor/github.com/uptrace/bun/hook.go
generated
vendored
|
|
@ -3,7 +3,6 @@ package bun
|
|||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"reflect"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
|
@ -11,18 +10,11 @@ import (
|
|||
"github.com/uptrace/bun/schema"
|
||||
)
|
||||
|
||||
type IQuery interface {
|
||||
schema.QueryAppender
|
||||
Operation() string
|
||||
GetModel() Model
|
||||
GetTableName() string
|
||||
}
|
||||
|
||||
type QueryEvent struct {
|
||||
DB *DB
|
||||
|
||||
QueryAppender schema.QueryAppender // Deprecated: use IQuery instead
|
||||
IQuery IQuery
|
||||
IQuery Query
|
||||
Query string
|
||||
QueryArgs []interface{}
|
||||
Model Model
|
||||
|
|
@ -58,7 +50,7 @@ type QueryHook interface {
|
|||
|
||||
func (db *DB) beforeQuery(
|
||||
ctx context.Context,
|
||||
iquery IQuery,
|
||||
iquery Query,
|
||||
query string,
|
||||
queryArgs []interface{},
|
||||
model Model,
|
||||
|
|
@ -116,13 +108,3 @@ func (db *DB) afterQueryFromIndex(ctx context.Context, event *QueryEvent, hookIn
|
|||
db.queryHooks[hookIndex].AfterQuery(ctx, event)
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
func callBeforeScanHook(ctx context.Context, v reflect.Value) error {
|
||||
return v.Interface().(schema.BeforeScanHook).BeforeScan(ctx)
|
||||
}
|
||||
|
||||
func callAfterScanHook(ctx context.Context, v reflect.Value) error {
|
||||
return v.Interface().(schema.AfterScanHook).AfterScan(ctx)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue