mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 07:46:15 -06:00
Bumps [github.com/uptrace/bun/extra/bunotel](https://github.com/uptrace/bun) from 1.2.1 to 1.2.5. - [Release notes](https://github.com/uptrace/bun/releases) - [Changelog](https://github.com/uptrace/bun/blob/master/CHANGELOG.md) - [Commits](https://github.com/uptrace/bun/compare/v1.2.1...v1.2.5) --- updated-dependencies: - dependency-name: github.com/uptrace/bun/extra/bunotel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
88 lines
2 KiB
Go
88 lines
2 KiB
Go
package bun
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/uptrace/bun/internal"
|
|
"github.com/uptrace/bun/schema"
|
|
)
|
|
|
|
type (
|
|
Safe = schema.Safe
|
|
Ident = schema.Ident
|
|
Name = schema.Name
|
|
|
|
NullTime = schema.NullTime
|
|
BaseModel = schema.BaseModel
|
|
Query = schema.Query
|
|
|
|
BeforeAppendModelHook = schema.BeforeAppendModelHook
|
|
|
|
BeforeScanRowHook = schema.BeforeScanRowHook
|
|
AfterScanRowHook = schema.AfterScanRowHook
|
|
)
|
|
|
|
func SafeQuery(query string, args ...interface{}) schema.QueryWithArgs {
|
|
return schema.SafeQuery(query, args)
|
|
}
|
|
|
|
type BeforeSelectHook interface {
|
|
BeforeSelect(ctx context.Context, query *SelectQuery) error
|
|
}
|
|
|
|
type AfterSelectHook interface {
|
|
AfterSelect(ctx context.Context, query *SelectQuery) error
|
|
}
|
|
|
|
type BeforeInsertHook interface {
|
|
BeforeInsert(ctx context.Context, query *InsertQuery) error
|
|
}
|
|
|
|
type AfterInsertHook interface {
|
|
AfterInsert(ctx context.Context, query *InsertQuery) error
|
|
}
|
|
|
|
type BeforeUpdateHook interface {
|
|
BeforeUpdate(ctx context.Context, query *UpdateQuery) error
|
|
}
|
|
|
|
type AfterUpdateHook interface {
|
|
AfterUpdate(ctx context.Context, query *UpdateQuery) error
|
|
}
|
|
|
|
type BeforeDeleteHook interface {
|
|
BeforeDelete(ctx context.Context, query *DeleteQuery) error
|
|
}
|
|
|
|
type AfterDeleteHook interface {
|
|
AfterDelete(ctx context.Context, query *DeleteQuery) error
|
|
}
|
|
|
|
type BeforeCreateTableHook interface {
|
|
BeforeCreateTable(ctx context.Context, query *CreateTableQuery) error
|
|
}
|
|
|
|
type AfterCreateTableHook interface {
|
|
AfterCreateTable(ctx context.Context, query *CreateTableQuery) error
|
|
}
|
|
|
|
type BeforeDropTableHook interface {
|
|
BeforeDropTable(ctx context.Context, query *DropTableQuery) error
|
|
}
|
|
|
|
type AfterDropTableHook interface {
|
|
AfterDropTable(ctx context.Context, query *DropTableQuery) error
|
|
}
|
|
|
|
// SetLogger overwrites default Bun logger.
|
|
func SetLogger(logger internal.Logging) {
|
|
internal.SetLogger(logger)
|
|
}
|
|
|
|
func In(slice interface{}) schema.QueryAppender {
|
|
return schema.In(slice)
|
|
}
|
|
|
|
func NullZero(value interface{}) schema.QueryAppender {
|
|
return schema.NullZero(value)
|
|
}
|