Documentation
¶
Index ¶
- Variables
- func AutoMigrate(dst ...interface{}) error
- func Begin() *gorm.DB
- func Clauses(conds ...clause.Expression) *gorm.DB
- func CommitOrRollback(tx *gorm.DB, logic func() error) error
- func Connect(c Config, tables ...interface{}) error
- func Create(value interface{}) *gorm.DB
- func CreateInBatches(value interface{}, batchSize int) *gorm.DB
- func Find(dest interface{}, conds ...interface{}) *gorm.DB
- func FindInBatches(dest interface{}, batchSize int, fc func(tx *gorm.DB, batch int) error) *gorm.DB
- func FirstOrCreate(dest interface{}, conds ...interface{}) (tx *gorm.DB)
- func IsUniqueIndexConflictErr(err error) bool
- func Model(model interface{}) *gorm.DB
- func Order(value interface{}) *gorm.DB
- func Save(value interface{}) *gorm.DB
- func Select(query interface{}, args ...interface{}) *gorm.DB
- func Statement() *gorm.Statement
- func Transaction(logic func(tx *gorm.DB) error) error
- func Unscoped() *gorm.DB
- func Where(query interface{}, args ...interface{}) *gorm.DB
- type Config
- type Database
- type Logger
- func (l *Logger) Error(ctx context.Context, s string, i ...interface{})
- func (l *Logger) Info(ctx context.Context, s string, i ...interface{})
- func (l *Logger) LogMode(logLevel logger.LogLevel) logger.Interface
- func (l *Logger) Trace(ctx context.Context, begin time.Time, ...)
- func (l *Logger) Warn(ctx context.Context, s string, i ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBatchesStop = errors.New("batches stop")
Functions ¶
func AutoMigrate ¶
func AutoMigrate(dst ...interface{}) error
func CreateInBatches ¶
func FindInBatches ¶
func FirstOrCreate ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.