mysql

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier[T any](conn *MySQLExecutor) querier.Querier[T]

Types

type Executor

type Executor interface {
	QueryRows(ctx context.Context, q string, args ...interface{}) (*sqlx.Rows, error)
}

type Mock

type Mock struct {
	MySQLExecutor
	// contains filtered or unexported fields
}

func (*Mock) QueryRows

func (bq *Mock) QueryRows(ctx context.Context, q string, args ...interface{}) (*sqlx.Rows, error)

type MySQLConf

type MySQLConf struct {
	User     string
	Password string
	Host     string
	Port     int
}

type MySQLExecutor

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

func NewMySQLExecutor

func NewMySQLExecutor(ctx context.Context, conf *MySQLConf) (*MySQLExecutor, error)

func (*MySQLExecutor) Close

func (e *MySQLExecutor) Close() error

func (*MySQLExecutor) GetDb

func (e *MySQLExecutor) GetDb() *sqlx.DB

func (*MySQLExecutor) QueryRows

func (e *MySQLExecutor) QueryRows(ctx context.Context, sql string, args ...interface{}) (*sqlx.Rows, error)

Jump to

Keyboard shortcuts

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