mysql

package
v0.0.0-...-ace9e8d Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aide

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

Aide provides mysql api wrapper.

func NewAide

func NewAide(config Config) *Aide

NewAide new an instance.

func (*Aide) Close

func (aide *Aide) Close() error

Close close a connection.

func (*Aide) Open

func (aide *Aide) Open() error

Open open a connection.

func (*Aide) Query

func (aide *Aide) Query(query string, args ...interface{}) (*sql.Rows, error)

Query query rows.

type Config

type Config struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Network  string `yaml:"network"`
	Server   string `yaml:"server"`
	Port     int    `yaml:"port"`
	Database string `yaml:"database"`
}

Config represents mysql configs.

func (*Config) Load

func (config *Config) Load(filePath string) error

Load load mysql configs.

Jump to

Keyboard shortcuts

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