testing

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DriverName = "testdb"
)

Functions

func NewDb

func NewDb() *sql.DB

Types

type Conn

type Conn struct{}

func (*Conn) Begin

func (c *Conn) Begin() (driver.Tx, error)

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) ExecContext

func (c *Conn) ExecContext(ctx context.Context, _ string, _ []driver.NamedValue) (driver.Result, error)

func (*Conn) Prepare

func (c *Conn) Prepare(_ string) (driver.Stmt, error)

func (*Conn) QueryContext

func (c *Conn) QueryContext(ctx context.Context, _ string, _ []driver.NamedValue) (driver.Rows, error)

QueryContext returns an empty result set to avoid fast-path ErrSkip propagation from the driver during tests.

type Driver

type Driver struct{}

func (*Driver) Open

func (d *Driver) Open(name string) (driver.Conn, error)

type Rows

type Rows struct{}

Rows is a minimal implementation that represents an empty result set.

func (*Rows) Close

func (r *Rows) Close() error

func (*Rows) Columns

func (r *Rows) Columns() []string

func (*Rows) Next

func (r *Rows) Next(_ []driver.Value) error

type Stmt

type Stmt struct{}

func (*Stmt) Close

func (s *Stmt) Close() error

func (*Stmt) Exec

func (s *Stmt) Exec(_ []driver.Value) (driver.Result, error)

func (*Stmt) NumInput

func (s *Stmt) NumInput() int

func (*Stmt) Query

func (s *Stmt) Query(_ []driver.Value) (driver.Rows, error)

type Tx

type Tx struct{}

func (*Tx) Commit

func (t *Tx) Commit() error

func (*Tx) Rollback

func (t *Tx) Rollback() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL