Documentation
¶
Index ¶
- func DefaultDsn() *dsn
- func Dsn(opts ...dsnOption) *dsn
- func LoadMySQL(dsn *dsn) error
- func SetConnMaxIdleTime(ms *MySQL, d time.Duration) error
- func SetConnMaxLifetime(ms *MySQL, d time.Duration) error
- func SetMaxIdleConns(ms *MySQL, n int) error
- func SetMaxOpenConns(ms *MySQL, n int) error
- func WithCharset(charset string) dsnOption
- func WithDatabase(database string) dsnOption
- func WithHost(host string) dsnOption
- func WithLocal(loc string) dsnOption
- func WithParseTime(parseTime string) dsnOption
- func WithPassword(password string) dsnOption
- func WithPort(port string) dsnOption
- func WithUsername(usename string) dsnOption
- type MySQL
- func (ms *MySQL) Begin() *MySQL
- func (ms *MySQL) Commit() *MySQL
- func (ms *MySQL) Create(value interface{}) *MySQL
- func (ms *MySQL) Debug() *MySQL
- func (ms *MySQL) Delete(value interface{}) *MySQL
- func (ms *MySQL) Error() string
- func (ms *MySQL) FindAll(dest interface{}) *MySQL
- func (ms *MySQL) FindOne(dest interface{}) *MySQL
- func (ms *MySQL) Found() bool
- func (ms *MySQL) Group(name string) *MySQL
- func (ms *MySQL) Model(value interface{}) *MySQL
- func (ms *MySQL) OK() error
- func (ms *MySQL) Or(query interface{}, args ...interface{}) *MySQL
- func (ms *MySQL) Order(value interface{}) *MySQL
- func (ms *MySQL) Ping() error
- func (ms *MySQL) Rollback() *MySQL
- func (ms *MySQL) Save(value interface{}) *MySQL
- func (ms *MySQL) Table(name string) *MySQL
- func (ms *MySQL) Update(column string, value interface{}) *MySQL
- func (ms *MySQL) Updates(values interface{}) *MySQL
- func (ms *MySQL) Where(query interface{}, args ...interface{}) *MySQL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDsn ¶
func DefaultDsn() *dsn
func SetMaxIdleConns ¶
func SetMaxOpenConns ¶
func WithCharset ¶
func WithCharset(charset string) dsnOption
func WithDatabase ¶
func WithDatabase(database string) dsnOption
func WithParseTime ¶
func WithParseTime(parseTime string) dsnOption
func WithPassword ¶
func WithPassword(password string) dsnOption
func WithUsername ¶
func WithUsername(usename string) dsnOption
Types ¶
Click to show internal directories.
Click to hide internal directories.