Documentation
¶
Index ¶
- type MySQL
- func (m *MySQL) BeginTx() (*Tx, error)
- func (m *MySQL) Close() error
- func (m *MySQL) Delete(query string, args ...any) (int64, error)
- func (m *MySQL) GetConn() *sql.DB
- func (m *MySQL) Insert(query string, args ...any) (int64, error)
- func (m *MySQL) InsertContext(ctx context.Context, query string, args ...any) (int64, error)
- func (m *MySQL) Open(dsn string, ops ...Option) error
- func (m *MySQL) Ping(ctx context.Context) error
- func (m *MySQL) QueryForMap(query string, args ...any) (map[string]any, error)
- func (m *MySQL) QueryForMapSlice(query string, args ...any) ([]map[string]any, error)
- func (m *MySQL) QueryMapContext(ctx context.Context, query string, args ...any) (map[string]any, error)
- func (m *MySQL) QueryMapSliceContext(ctx context.Context, query string, args ...any) ([]map[string]any, error)
- func (m *MySQL) Reset(dsn string, db *sql.DB)
- func (m *MySQL) Update(query string, args ...any) (int64, error)
- func (m *MySQL) UpdateContext(ctx context.Context, query string, args ...any) (int64, error)
- type Option
- type Tx
- func (t *Tx) Close() error
- func (t *Tx) Delete(query string, args ...any) (int64, error)
- func (t *Tx) DeleteContext(ctx context.Context, query string, args ...any) (int64, error)
- func (t *Tx) HasError()
- func (t *Tx) Insert(query string, args ...any) (int64, error)
- func (t *Tx) InsertContext(ctx context.Context, query string, args ...any) (int64, error)
- func (t *Tx) QueryForMap(query string, args ...any) (map[string]any, error)
- func (t *Tx) QueryForMapSlice(query string, args ...any) ([]map[string]any, error)
- func (t *Tx) QueryMapContext(ctx context.Context, query string, args ...any) (map[string]any, error)
- func (t *Tx) QueryMapSliceContext(ctx context.Context, query string, args ...any) ([]map[string]any, error)
- func (t *Tx) Update(query string, args ...any) (int64, error)
- func (t *Tx) UpdateContext(ctx context.Context, query string, args ...any) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func (*MySQL) InsertContext ¶
func (*MySQL) QueryForMap ¶
func (*MySQL) QueryForMapSlice ¶
func (*MySQL) QueryMapContext ¶
func (*MySQL) QueryMapSliceContext ¶
type Option ¶
type Option func(*MySQL)
func WithMaxConns ¶
func WithMaxIdle ¶
func WithMaxLifetime ¶
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (*Tx) DeleteContext ¶
func (*Tx) InsertContext ¶
func (*Tx) QueryForMap ¶
func (*Tx) QueryForMapSlice ¶
func (*Tx) QueryMapContext ¶
func (*Tx) QueryMapSliceContext ¶
Click to show internal directories.
Click to hide internal directories.