mysql

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const EngineName = "mysql"

Variables

This section is empty.

Functions

func NewMySQL

func NewMySQL(dsn string) (sqldatabase.Engine, error)

NewMySQL creates a new MySQL engine. The dsn is the data source name.(e.g. root:password@tcp(localhost:3306)/test).

Types

type MySQL

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

MySQL is a MySQL engine.

func (MySQL) Close

func (m MySQL) Close() error

func (MySQL) Dialect

func (m MySQL) Dialect() string

func (MySQL) Query

func (m MySQL) Query(ctx context.Context, query string, args ...any) ([]string, [][]string, error)

func (MySQL) TableInfo

func (m MySQL) TableInfo(ctx context.Context, table string) (string, error)

func (MySQL) TableNames

func (m MySQL) TableNames(ctx context.Context) ([]string, error)

Jump to

Keyboard shortcuts

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