Documentation ¶
Index ¶
- func ContextWith(ctx context.Context, key string) context.Context
- func ContextWithDB(ctx context.Context, db *gorm.DB) context.Context
- func Ctx(ctx context.Context) *gorm.DB
- func CtxWith(ctx context.Context, key string) *gorm.DB
- func Default() *gorm.DB
- func RecordNotFound(err error) bool
- func RegisterDriver(t Driver, f func(*Config) gorm.Dialector)
- func With(key string) *gorm.DB
- type Config
- type DB
- type Driver
- type GroupConfig
- type Logger
- func (l *Logger) Error(ctx context.Context, msg string, args ...interface{})
- func (l *Logger) Info(ctx context.Context, msg string, args ...interface{})
- func (l *Logger) LogMode(level logger.LogLevel) logger.Interface
- func (l *Logger) ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{})
- func (l *Logger) Trace(ctx context.Context, begin time.Time, ...)
- func (l *Logger) Warn(ctx context.Context, msg string, args ...interface{})
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWith ¶ added in v1.1.0
func ContextWithDB ¶ added in v1.1.0
Types ¶
type DB ¶ added in v1.1.0
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CloseHandle ¶ added in v1.1.0
func (d *DB) CloseHandle()
type GroupConfig ¶ added in v1.1.0
type Logger ¶ added in v1.1.0
func (*Logger) ParamsFilter ¶ added in v1.1.0
func (l *Logger) ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{})
ParamsFilter Trace print sql message
Click to show internal directories.
Click to hide internal directories.