mocks

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLExecutor

type SQLExecutor struct {
	mock.Mock
}

func NewSQLExecutor

func NewSQLExecutor() *SQLExecutor

func (*SQLExecutor) BeginTx

func (m *SQLExecutor) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)

func (*SQLExecutor) Exec

func (m *SQLExecutor) Exec(ctx context.Context, query string, args ...any) (sql.Result, error)

func (*SQLExecutor) SelectMany

func (m *SQLExecutor) SelectMany(ctx context.Context, dest any, query string, args ...any) error

func (*SQLExecutor) SelectOne

func (m *SQLExecutor) SelectOne(ctx context.Context, dest any, query string, args ...any) error

type SQLResult

type SQLResult struct {
	// contains filtered or unexported fields
}

func NewSQLResult

func NewSQLResult(lastInsertId int64, rowsAffected int64) *SQLResult

func (*SQLResult) LastInsertId

func (r *SQLResult) LastInsertId() (int64, error)

func (*SQLResult) RowsAffected

func (r *SQLResult) RowsAffected() (int64, error)

Jump to

Keyboard shortcuts

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