connection

package
v0.0.0-...-50d7d3f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnPool

type ConnPool struct {
	gorm.ConnPool
	// contains filtered or unexported fields
}

func (*ConnPool) BeginTx

func (s *ConnPool) BeginTx(ctx context.Context, opt *sql.TxOptions) (gorm.ConnPool, error)

func (*ConnPool) Commit

func (s *ConnPool) Commit() error

func (ConnPool) ExecContext

func (s ConnPool) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func (*ConnPool) GetDBConn

func (s *ConnPool) GetDBConn() (*sql.DB, error)

func (ConnPool) PrepareContext

func (s ConnPool) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

func (ConnPool) QueryContext

func (s ConnPool) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

func (ConnPool) QueryRowContext

func (s ConnPool) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

func (*ConnPool) Rollback

func (s *ConnPool) Rollback() error

func (*ConnPool) String

func (s *ConnPool) String() string

type PluginRetry

type PluginRetry interface {
	Name() string
	Initialize(*gorm.DB) error
}

func RegisterRetry

func RegisterRetry() PluginRetry

type RetryConfig

type RetryConfig struct {
	Attempt int           `envconfig:"GORM_RETRY_ATTEMPT" required:"true"`
	Delay   time.Duration `envconfig:"GORM_RETRY_DELAY" required:"true"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL