Documentation ¶
Overview ¶
Package mysql provides a client-wrapper implementation of the [backend.RelationalDB] interface for a mysql server.
Index ¶
- type MySqlDB
- func (s *MySqlDB) Exec(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (s *MySqlDB) Get(ctx context.Context, dst interface{}, query string, args ...any) error
- func (s *MySqlDB) Prepare(ctx context.Context, query string) (*sql.Stmt, error)
- func (s *MySqlDB) Query(ctx context.Context, query string, args ...any) (*sql.Rows, error)
- func (s *MySqlDB) Select(ctx context.Context, dst interface{}, query string, args ...any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySqlDB ¶
type MySqlDB struct {
// contains filtered or unexported fields
}
Implements a RelationalDB that uses the mysql package
func NewMySqlDB ¶
func NewMySqlDB(ctx context.Context, addr string, name string, username string, password string) (*MySqlDB, error)
Instantiates a new MySqlDB instance that stores query data in a MySqlDB instance
Click to show internal directories.
Click to hide internal directories.