Documentation ¶
Index ¶
- Variables
- type DB
- func (d *DB) Begin(ctx context.Context, opts ...*sql.TxOptions) *gorm.DB
- func (d *DB) Create(ctx context.Context, model interface{}) *gorm.DB
- func (d *DB) Exec(ctx context.Context, sql string, values ...interface{}) *gorm.DB
- func (d *DB) GetDB(ctx context.Context) *gorm.DB
- func (d *DB) Init(ctx context.Context) error
- func (d *DB) Key() string
- func (d *DB) Model(ctx context.Context, model interface{}) *gorm.DB
- func (d *DB) OnUpdate(key string, val string)
- func (d *DB) Ping(ctx context.Context) error
- func (d *DB) Raw(ctx context.Context, sql string, values ...interface{}) *gorm.DB
- func (d *DB) Table(ctx context.Context, table string) *gorm.DB
- func (d *DB) Transaction(ctx context.Context, fc func(tx *gorm.DB) error, opts ...*sql.TxOptions) (err error)
- func (d *DB) Update(ctx context.Context, model interface{}) *gorm.DB
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) Begin ¶
Begin begins a transaction
func (*DB) Exec ¶
Exec execute raw sql
Click to show internal directories.
Click to hide internal directories.