db

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 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 Dao

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

func (*Dao) Begin

func (dao *Dao) Begin() error

func (*Dao) Commit

func (dao *Dao) Commit() error

func (*Dao) Execute added in v1.0.1

func (dao *Dao) Execute(sql string, params interface{}) (int64, error)

func (*Dao) Get

func (dao *Dao) Get(dest interface{}, sql string, params ...interface{}) error

func (*Dao) Query added in v1.0.1

func (dao *Dao) Query(sql string, params interface{}) (*sqlx.Rows, error)

func (*Dao) Rollback

func (dao *Dao) Rollback() error

type DaoFactory

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

func New

func New(userName string, userPass string, server string, port int, database string) (*DaoFactory, error)

func (*DaoFactory) Close

func (df *DaoFactory) Close() error

func (*DaoFactory) GetDao

func (df *DaoFactory) GetDao() *Dao

func (*DaoFactory) Ping

func (df *DaoFactory) Ping() error

func (*DaoFactory) SetConnMaxLifetime

func (df *DaoFactory) SetConnMaxLifetime(d time.Duration)

func (*DaoFactory) SetMaxIdleConns

func (df *DaoFactory) SetMaxIdleConns(n int)

func (*DaoFactory) SetMaxOpenConns

func (df *DaoFactory) SetMaxOpenConns(n int)

func (*DaoFactory) Stat

func (df *DaoFactory) Stat() sql.DBStats

Jump to

Keyboard shortcuts

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