Versions in this module Expand all Collapse all v1 v1.0.2 Sep 21, 2024 v1.0.1 Sep 14, 2024 Changes in this version + const DataBaseName + const DataBaseName_RO + var ConfigDefault = Config + func GetActiveList() (nameList []name) + func GetDSN(n name) string + func IsTx(mx Mx) bool + func JSON(rows *sql.Rows) (j []byte, err error) + func Map(rows *sql.Rows) (res []map[string]interface{}, err error) + func MapV1(rows *sql.Rows) (data []map[string]interface{}, err error) + func MySQLErrorIs(err error, code int) bool + func New(c ...Config) (err error) + func Rommit(_log *ilog.Data, err error, txs ...*sql.Tx) error + type Config struct + Conn name + ConnMaxIdleTime time.Duration + ConnMaxLifetime time.Duration + MaxIdleConns int + MaxOpenConns int + type Mx interface + Exec func(query string, args ...any) (sql.Result, error) + ExecContext func(ctx context.Context, query string, args ...any) (sql.Result, error) + Prepare func(query string) (*sql.Stmt, error) + PrepareContext func(ctx context.Context, query string) (*sql.Stmt, error) + Query func(query string, args ...any) (*sql.Rows, error) + QueryContext func(ctx context.Context, query string, args ...any) (*sql.Rows, error) + QueryRow func(query string, args ...any) *sql.Row + QueryRowContext func(ctx context.Context, query string, args ...any) *sql.Row + type Sec time.Duration + func (duration Sec) Value() (driver.Value, error) + func (sec *Sec) Scan(src interface{}) error + func (sec *Sec) UnmarshalJSON(s []byte) (err error) + func (sec Sec) Duration() time.Duration + func (sec Sec) MarshalJSON() ([]byte, error)