mysql

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPermissionError added in v0.15.3

func IsPermissionError(err error) bool

IsPermissionError reports whether err indicates the DWH credentials lack the privileges required for the attempted operation.

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
	Database      string
	AllowInsecure bool
	Params        map[string]string
}

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) Exec added in v0.11.0

func (e *MySQLExecutor) Exec(ctx context.Context, query string, args ...any) 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)

func (*MySQLExecutor) Select added in v0.11.0

func (e *MySQLExecutor) Select(ctx context.Context, dest any, query string, args ...any) error

Jump to

Keyboard shortcuts

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