Versions in this module Expand all Collapse all v1 v1.0.0 Sep 5, 2024 Changes in this version + var ErrConnClosed = fmt.Errorf("%w connection is closed", ErrDummy) + var ErrDummy = errors.New("dummy") + var ErrInvalidDSN = fmt.Errorf("%w invalid dsn", ErrDummy) + var ErrRowsClosed = errors.New("rows closed") + var ErrStmtClosed = fmt.Errorf("%w statement is closed", ErrDummy) + var ErrTxDone = fmt.Errorf("%w transaction is done", ErrDummy) + type Conn struct + Closed bool + Result *Result + Rows *Rows + Stmt *Stmt + Tx *Tx + func (c *Conn) Begin() (driver.Tx, error) + func (c *Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) + func (c *Conn) Close() error + func (c *Conn) Exec(query string, args []driver.Value) (driver.Result, error) + func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) + func (c *Conn) NamedValue(args []driver.Value) []driver.NamedValue + func (c *Conn) Ping(ctx context.Context) error + func (c *Conn) Prepare(query string) (driver.Stmt, error) + func (c *Conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) + func (c *Conn) Query(query string, args []driver.Value) (driver.Rows, error) + func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) + type Connector struct + Conn *Conn + DSN string + func (c *Connector) Connect(ctx context.Context) (driver.Conn, error) + func (v *Connector) Driver() driver.Driver + type Driver struct + func (d Driver) Open(dsn string) (driver.Conn, error) + func (d Driver) OpenConnector(dsn string) (driver.Connector, error) + type Result struct + Affected int64 + InsertID int64 + func (r *Result) LastInsertId() (int64, error) + func (r *Result) RowsAffected() (int64, error) + type Rows struct + Closed bool + func (r *Rows) Close() error + func (r *Rows) Columns() []string + func (r *Rows) Next(dest []driver.Value) error + type Stmt struct + Closed bool + Result *Result + Rows *Rows + func (s *Stmt) Close() error + func (s *Stmt) Exec(args []driver.Value) (driver.Result, error) + func (s *Stmt) ExecContext(ctx context.Context, args []driver.Value) (driver.Result, error) + func (s *Stmt) NumInput() int + func (s *Stmt) Query(args []driver.Value) (driver.Rows, error) + func (s *Stmt) QueryContext(ctx context.Context, args []driver.Value) (driver.Rows, error) + type Tx struct + Closed bool + func (tx *Tx) Commit() error + func (tx *Tx) Rollback() error