sql

package
v0.0.0-...-4908b21 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDB

type IDB interface {
	DB(ctx context.Context) bun.IDB

	PgxPool(ctx context.Context) *pgxpool.Pool
}

type MockIDB

type MockIDB struct {
	mock.Mock
}

MockIDB is an autogenerated mock type for the IDB type

func NewMockIDB

func NewMockIDB(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockIDB

NewMockIDB creates a new instance of MockIDB. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockIDB) DB

func (_mock *MockIDB) DB(ctx context.Context) bun.IDB

DB provides a mock function for the type MockIDB

func (*MockIDB) EXPECT

func (_m *MockIDB) EXPECT() *MockIDB_Expecter

func (*MockIDB) PgxPool

func (_mock *MockIDB) PgxPool(ctx context.Context) *pgxpool.Pool

PgxPool provides a mock function for the type MockIDB

type MockIDB_DB_Call

type MockIDB_DB_Call struct {
	*mock.Call
}

MockIDB_DB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DB'

func (*MockIDB_DB_Call) Return

func (_c *MockIDB_DB_Call) Return(iDB bun.IDB) *MockIDB_DB_Call

func (*MockIDB_DB_Call) Run

func (_c *MockIDB_DB_Call) Run(run func(ctx context.Context)) *MockIDB_DB_Call

func (*MockIDB_DB_Call) RunAndReturn

func (_c *MockIDB_DB_Call) RunAndReturn(run func(ctx context.Context) bun.IDB) *MockIDB_DB_Call

type MockIDB_Expecter

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

func (*MockIDB_Expecter) DB

func (_e *MockIDB_Expecter) DB(ctx interface{}) *MockIDB_DB_Call

DB is a helper method to define mock.On call

  • ctx context.Context

func (*MockIDB_Expecter) PgxPool

func (_e *MockIDB_Expecter) PgxPool(ctx interface{}) *MockIDB_PgxPool_Call

PgxPool is a helper method to define mock.On call

  • ctx context.Context

type MockIDB_PgxPool_Call

type MockIDB_PgxPool_Call struct {
	*mock.Call
}

MockIDB_PgxPool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PgxPool'

func (*MockIDB_PgxPool_Call) Return

func (*MockIDB_PgxPool_Call) Run

func (_c *MockIDB_PgxPool_Call) Run(run func(ctx context.Context)) *MockIDB_PgxPool_Call

func (*MockIDB_PgxPool_Call) RunAndReturn

func (_c *MockIDB_PgxPool_Call) RunAndReturn(run func(ctx context.Context) *pgxpool.Pool) *MockIDB_PgxPool_Call

type PostgresDB

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

func NewPostgresDB

func NewPostgresDB(i do.Injector) (*PostgresDB, error)

func (*PostgresDB) DB

func (pd *PostgresDB) DB(ctx context.Context) bun.IDB

func (*PostgresDB) PgxPool

func (pd *PostgresDB) PgxPool(ctx context.Context) *pgxpool.Pool

func (*PostgresDB) Shutdown

func (pd *PostgresDB) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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