mysqlx

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDsn

func DefaultDsn() *dsn

func Dsn

func Dsn(opts ...dsnOption) *dsn

func LoadMySQL

func LoadMySQL(dsn *dsn) error

func SetConnMaxIdleTime

func SetConnMaxIdleTime(ms *MySQL, d time.Duration) error

func SetConnMaxLifetime

func SetConnMaxLifetime(ms *MySQL, d time.Duration) error

func SetMaxIdleConns

func SetMaxIdleConns(ms *MySQL, n int) error

func SetMaxOpenConns

func SetMaxOpenConns(ms *MySQL, n int) error

func WithCharset

func WithCharset(charset string) dsnOption

func WithDatabase

func WithDatabase(database string) dsnOption

func WithHost

func WithHost(host string) dsnOption

func WithLocal

func WithLocal(loc string) dsnOption

func WithParseTime

func WithParseTime(parseTime string) dsnOption

func WithPassword

func WithPassword(password string) dsnOption

func WithPort

func WithPort(port string) dsnOption

func WithUsername

func WithUsername(usename string) dsnOption

Types

type MySQL

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

func CloneMySQL

func CloneMySQL(ms *MySQL) *MySQL

func GetMySQL

func GetMySQL() (*MySQL, error)

func NewMySQL

func NewMySQL(db *gorm.DB) *MySQL

func (*MySQL) Begin

func (ms *MySQL) Begin() *MySQL

func (*MySQL) Commit

func (ms *MySQL) Commit() *MySQL

func (*MySQL) Create

func (ms *MySQL) Create(value interface{}) *MySQL

func (*MySQL) Debug

func (ms *MySQL) Debug() *MySQL

func (*MySQL) Delete

func (ms *MySQL) Delete(value interface{}) *MySQL

func (*MySQL) Error

func (ms *MySQL) Error() string

func (*MySQL) FindAll

func (ms *MySQL) FindAll(dest interface{}) *MySQL

func (*MySQL) FindOne

func (ms *MySQL) FindOne(dest interface{}) *MySQL

func (*MySQL) Found

func (ms *MySQL) Found() bool

func (*MySQL) Group

func (ms *MySQL) Group(name string) *MySQL

func (*MySQL) Model

func (ms *MySQL) Model(value interface{}) *MySQL

func (*MySQL) OK

func (ms *MySQL) OK() error

func (*MySQL) Or

func (ms *MySQL) Or(query interface{}, args ...interface{}) *MySQL

func (*MySQL) Order

func (ms *MySQL) Order(value interface{}) *MySQL

func (*MySQL) Ping

func (ms *MySQL) Ping() error

func (*MySQL) Rollback

func (ms *MySQL) Rollback() *MySQL

func (*MySQL) Save

func (ms *MySQL) Save(value interface{}) *MySQL

func (*MySQL) Table

func (ms *MySQL) Table(name string) *MySQL

func (*MySQL) Update

func (ms *MySQL) Update(column string, value interface{}) *MySQL

func (*MySQL) Updates

func (ms *MySQL) Updates(values interface{}) *MySQL

func (*MySQL) Where

func (ms *MySQL) Where(query interface{}, args ...interface{}) *MySQL

Jump to

Keyboard shortcuts

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