db

package
v0.0.0-...-828813d Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package db is a generated GoMock package.

Package db is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunInTransaction

func RunInTransaction(ctx context.Context, db Ext, fn func(ctx context.Context, db Ext) error) (err error)

RunInTransaction - トランザクションで実行

Types

type Ext

type Ext interface {
	sqlx.Ext

	sqlx.QueryerContext
	sqlx.ExecerContext
}

Ext - transactionかどうかに依らないSQLインターフェース

type MockExt

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

MockExt is a mock of Ext interface.

func NewMockExt

func NewMockExt(ctrl *gomock.Controller) *MockExt

NewMockExt creates a new mock instance.

func (*MockExt) BindNamed

func (m *MockExt) BindNamed(arg0 string, arg1 interface{}) (string, []interface{}, error)

BindNamed mocks base method.

func (*MockExt) DriverName

func (m *MockExt) DriverName() string

DriverName mocks base method.

func (*MockExt) EXPECT

func (m *MockExt) EXPECT() *MockExtMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockExt) Exec

func (m *MockExt) Exec(query string, args ...interface{}) (sql.Result, error)

Exec mocks base method.

func (*MockExt) ExecContext

func (m *MockExt) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

ExecContext mocks base method.

func (*MockExt) Query

func (m *MockExt) Query(query string, args ...interface{}) (*sql.Rows, error)

Query mocks base method.

func (*MockExt) QueryContext

func (m *MockExt) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

QueryContext mocks base method.

func (*MockExt) QueryRowx

func (m *MockExt) QueryRowx(query string, args ...interface{}) *sqlx.Row

QueryRowx mocks base method.

func (*MockExt) QueryRowxContext

func (m *MockExt) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *sqlx.Row

QueryRowxContext mocks base method.

func (*MockExt) Queryx

func (m *MockExt) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)

Queryx mocks base method.

func (*MockExt) QueryxContext

func (m *MockExt) QueryxContext(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)

QueryxContext mocks base method.

func (*MockExt) Rebind

func (m *MockExt) Rebind(arg0 string) string

Rebind mocks base method.

type MockExtMockRecorder

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

MockExtMockRecorder is the mock recorder for MockExt.

func (*MockExtMockRecorder) BindNamed

func (mr *MockExtMockRecorder) BindNamed(arg0, arg1 interface{}) *gomock.Call

BindNamed indicates an expected call of BindNamed.

func (*MockExtMockRecorder) DriverName

func (mr *MockExtMockRecorder) DriverName() *gomock.Call

DriverName indicates an expected call of DriverName.

func (*MockExtMockRecorder) Exec

func (mr *MockExtMockRecorder) Exec(query interface{}, args ...interface{}) *gomock.Call

Exec indicates an expected call of Exec.

func (*MockExtMockRecorder) ExecContext

func (mr *MockExtMockRecorder) ExecContext(ctx, query interface{}, args ...interface{}) *gomock.Call

ExecContext indicates an expected call of ExecContext.

func (*MockExtMockRecorder) Query

func (mr *MockExtMockRecorder) Query(query interface{}, args ...interface{}) *gomock.Call

Query indicates an expected call of Query.

func (*MockExtMockRecorder) QueryContext

func (mr *MockExtMockRecorder) QueryContext(ctx, query interface{}, args ...interface{}) *gomock.Call

QueryContext indicates an expected call of QueryContext.

func (*MockExtMockRecorder) QueryRowx

func (mr *MockExtMockRecorder) QueryRowx(query interface{}, args ...interface{}) *gomock.Call

QueryRowx indicates an expected call of QueryRowx.

func (*MockExtMockRecorder) QueryRowxContext

func (mr *MockExtMockRecorder) QueryRowxContext(ctx, query interface{}, args ...interface{}) *gomock.Call

QueryRowxContext indicates an expected call of QueryRowxContext.

func (*MockExtMockRecorder) Queryx

func (mr *MockExtMockRecorder) Queryx(query interface{}, args ...interface{}) *gomock.Call

Queryx indicates an expected call of Queryx.

func (*MockExtMockRecorder) QueryxContext

func (mr *MockExtMockRecorder) QueryxContext(ctx, query interface{}, args ...interface{}) *gomock.Call

QueryxContext indicates an expected call of QueryxContext.

func (*MockExtMockRecorder) Rebind

func (mr *MockExtMockRecorder) Rebind(arg0 interface{}) *gomock.Call

Rebind indicates an expected call of Rebind.

type MocktxBeginnable

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

MocktxBeginnable is a mock of txBeginnable interface.

func NewMocktxBeginnable

func NewMocktxBeginnable(ctrl *gomock.Controller) *MocktxBeginnable

NewMocktxBeginnable creates a new mock instance.

func (*MocktxBeginnable) BeginTxx

func (m *MocktxBeginnable) BeginTxx(ctx context.Context, opts *sql.TxOptions) (*sqlx.Tx, error)

BeginTxx mocks base method.

func (*MocktxBeginnable) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MocktxBeginnableMockRecorder

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

MocktxBeginnableMockRecorder is the mock recorder for MocktxBeginnable.

func (*MocktxBeginnableMockRecorder) BeginTxx

func (mr *MocktxBeginnableMockRecorder) BeginTxx(ctx, opts interface{}) *gomock.Call

BeginTxx indicates an expected call of BeginTxx.

Jump to

Keyboard shortcuts

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