Documentation ¶
Index ¶
- func GormDecorate(database string) (*gorm.DB, error)
- type Configure
- type GormLoggerAdapter
- func (g *GormLoggerAdapter) Error(ctx context.Context, s string, i ...interface{})
- func (g *GormLoggerAdapter) Info(ctx context.Context, s string, i ...interface{})
- func (g *GormLoggerAdapter) LogMode(level LogLevel) Interface
- func (g *GormLoggerAdapter) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (g *GormLoggerAdapter) Warn(ctx context.Context, s string, i ...interface{})
- type GormProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configure ¶ added in v1.2.6
type Configure struct { bean.Component Level string `yaml:"loglevel"` SkipDefaultTransaction bool `yaml:"skip_default_transaction"` NamingStrategy struct { TablePrefix string `yaml:"table_prefix"` SingularTable bool `yaml:"singular_table"` } `yaml:"naming_strategy"` FullSaveAssociations bool `yaml:"full_save_associations"` DryRun bool `yaml:"dry_run"` PrepareStmt bool `yaml:"prepare_stmt"` DisableAutomaticPing bool `yaml:"disable_automatic_ping"` DisableForeignKeyConstraintWhenMigrating bool `yaml:"disable_foreign_key_constraint_when_migrating"` DisableNestedTransaction bool `yaml:"disable_nested_transaction"` AllowGlobalUpdate bool `yaml:"allow_global_update"` QueryFields bool `yaml:"query_fields"` CreateBatchSize int `yaml:"create_batch_size"` }
type GormLoggerAdapter ¶ added in v1.1.8
type GormLoggerAdapter struct { LogLevel SlowThreshold time.Duration // contains filtered or unexported fields }
func NewGormLoggerAdapter ¶ added in v1.1.8
func NewGormLoggerAdapter(logger *GormLoggerAdapter) *GormLoggerAdapter
func (*GormLoggerAdapter) Error ¶ added in v1.1.8
func (g *GormLoggerAdapter) Error(ctx context.Context, s string, i ...interface{})
func (*GormLoggerAdapter) Info ¶ added in v1.1.8
func (g *GormLoggerAdapter) Info(ctx context.Context, s string, i ...interface{})
func (*GormLoggerAdapter) LogMode ¶ added in v1.1.8
func (g *GormLoggerAdapter) LogMode(level LogLevel) Interface
Click to show internal directories.
Click to hide internal directories.