mysql

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MigrationDir = "migrations"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQLDBConnector

type MySQLDBConnector struct {
	DSN       string
	TLSConfig *_tls.TLSConfig
	// contains filtered or unexported fields
}

func NewMySQLDBConnector

func NewMySQLDBConnector(
	dsn string,
	tlsConfig *_tls.TLSConfig,
) *MySQLDBConnector

func (*MySQLDBConnector) Connect

func (c *MySQLDBConnector) Connect() (*gorm.DB, error)

func (*MySQLDBConnector) DB

func (c *MySQLDBConnector) DB() *gorm.DB

func (*MySQLDBConnector) WithMaxRetries added in v0.2.21

func (c *MySQLDBConnector) WithMaxRetries(maxRetries int) *MySQLDBConnector

type MySQLMigrator

type MySQLMigrator struct {
	// contains filtered or unexported fields
}

func NewMySQLMigrator

func NewMySQLMigrator(db *gorm.DB) (*MySQLMigrator, error)

func (*MySQLMigrator) Down

func (m *MySQLMigrator) Down(steps *int) error

func (*MySQLMigrator) Migrate

func (m *MySQLMigrator) Migrate() error

func (*MySQLMigrator) Up

func (m *MySQLMigrator) Up(steps *int) error

Jump to

Keyboard shortcuts

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