neosync_benthos_sql

package
v0.4.36 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDbPoolProvider

func NewDbPoolProvider() *dbPoolProvider

func RegisterPooledSqlInsertOutput

func RegisterPooledSqlInsertOutput(env *service.Environment, dbprovider DbPoolProvider, isRetry bool) error

Registers an output on a benthos environment called pooled_sql_raw

func RegisterPooledSqlRawInput

func RegisterPooledSqlRawInput(env *service.Environment, dbprovider DbPoolProvider, stopActivityChannel chan<- error) error

Registers an input on a benthos environment called pooled_sql_raw

func RegisterPooledSqlUpdateOutput

func RegisterPooledSqlUpdateOutput(env *service.Environment, dbprovider DbPoolProvider) error

Registers an output on a benthos environment called pooled_sql_raw

Types

type DbPoolProvider

type DbPoolProvider interface {
	GetDb(driver, dsn string) (SqlDbtx, error)
}

type MockSqlDbtx

type MockSqlDbtx struct {
	mock.Mock
}

MockSqlDbtx is an autogenerated mock type for the SqlDbtx type

func NewMockSqlDbtx

func NewMockSqlDbtx(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSqlDbtx

NewMockSqlDbtx creates a new instance of MockSqlDbtx. 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 (*MockSqlDbtx) BeginTx

func (_m *MockSqlDbtx) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)

BeginTx provides a mock function with given fields: ctx, opts

func (*MockSqlDbtx) Close

func (_m *MockSqlDbtx) Close() error

Close provides a mock function with given fields:

func (*MockSqlDbtx) EXPECT

func (_m *MockSqlDbtx) EXPECT() *MockSqlDbtx_Expecter

func (*MockSqlDbtx) ExecContext

func (_m *MockSqlDbtx) ExecContext(_a0 context.Context, _a1 string, _a2 ...interface{}) (sql.Result, error)

ExecContext provides a mock function with given fields: _a0, _a1, _a2

func (*MockSqlDbtx) PrepareContext

func (_m *MockSqlDbtx) PrepareContext(_a0 context.Context, _a1 string) (*sql.Stmt, error)

PrepareContext provides a mock function with given fields: _a0, _a1

func (*MockSqlDbtx) QueryContext

func (_m *MockSqlDbtx) QueryContext(_a0 context.Context, _a1 string, _a2 ...interface{}) (*sql.Rows, error)

QueryContext provides a mock function with given fields: _a0, _a1, _a2

func (*MockSqlDbtx) QueryRowContext

func (_m *MockSqlDbtx) QueryRowContext(_a0 context.Context, _a1 string, _a2 ...interface{}) *sql.Row

QueryRowContext provides a mock function with given fields: _a0, _a1, _a2

type MockSqlDbtx_BeginTx_Call

type MockSqlDbtx_BeginTx_Call struct {
	*mock.Call
}

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

func (*MockSqlDbtx_BeginTx_Call) Return

func (*MockSqlDbtx_BeginTx_Call) Run

func (*MockSqlDbtx_BeginTx_Call) RunAndReturn

type MockSqlDbtx_Close_Call

type MockSqlDbtx_Close_Call struct {
	*mock.Call
}

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

func (*MockSqlDbtx_Close_Call) Return

func (*MockSqlDbtx_Close_Call) Run

func (_c *MockSqlDbtx_Close_Call) Run(run func()) *MockSqlDbtx_Close_Call

func (*MockSqlDbtx_Close_Call) RunAndReturn

func (_c *MockSqlDbtx_Close_Call) RunAndReturn(run func() error) *MockSqlDbtx_Close_Call

type MockSqlDbtx_ExecContext_Call

type MockSqlDbtx_ExecContext_Call struct {
	*mock.Call
}

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

func (*MockSqlDbtx_ExecContext_Call) Return

func (*MockSqlDbtx_ExecContext_Call) Run

func (_c *MockSqlDbtx_ExecContext_Call) Run(run func(_a0 context.Context, _a1 string, _a2 ...interface{})) *MockSqlDbtx_ExecContext_Call

func (*MockSqlDbtx_ExecContext_Call) RunAndReturn

func (_c *MockSqlDbtx_ExecContext_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (sql.Result, error)) *MockSqlDbtx_ExecContext_Call

type MockSqlDbtx_Expecter

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

func (*MockSqlDbtx_Expecter) BeginTx

func (_e *MockSqlDbtx_Expecter) BeginTx(ctx interface{}, opts interface{}) *MockSqlDbtx_BeginTx_Call

BeginTx is a helper method to define mock.On call

  • ctx context.Context
  • opts *sql.TxOptions

func (*MockSqlDbtx_Expecter) Close

Close is a helper method to define mock.On call

func (*MockSqlDbtx_Expecter) ExecContext

func (_e *MockSqlDbtx_Expecter) ExecContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockSqlDbtx_ExecContext_Call

ExecContext is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string
  • _a2 ...interface{}

func (*MockSqlDbtx_Expecter) PrepareContext

func (_e *MockSqlDbtx_Expecter) PrepareContext(_a0 interface{}, _a1 interface{}) *MockSqlDbtx_PrepareContext_Call

PrepareContext is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string

func (*MockSqlDbtx_Expecter) QueryContext

func (_e *MockSqlDbtx_Expecter) QueryContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockSqlDbtx_QueryContext_Call

QueryContext is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string
  • _a2 ...interface{}

func (*MockSqlDbtx_Expecter) QueryRowContext

func (_e *MockSqlDbtx_Expecter) QueryRowContext(_a0 interface{}, _a1 interface{}, _a2 ...interface{}) *MockSqlDbtx_QueryRowContext_Call

QueryRowContext is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 string
  • _a2 ...interface{}

type MockSqlDbtx_PrepareContext_Call

type MockSqlDbtx_PrepareContext_Call struct {
	*mock.Call
}

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

func (*MockSqlDbtx_PrepareContext_Call) Return

func (*MockSqlDbtx_PrepareContext_Call) Run

func (*MockSqlDbtx_PrepareContext_Call) RunAndReturn

type MockSqlDbtx_QueryContext_Call

type MockSqlDbtx_QueryContext_Call struct {
	*mock.Call
}

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

func (*MockSqlDbtx_QueryContext_Call) Return

func (*MockSqlDbtx_QueryContext_Call) Run

func (_c *MockSqlDbtx_QueryContext_Call) Run(run func(_a0 context.Context, _a1 string, _a2 ...interface{})) *MockSqlDbtx_QueryContext_Call

func (*MockSqlDbtx_QueryContext_Call) RunAndReturn

func (_c *MockSqlDbtx_QueryContext_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (*sql.Rows, error)) *MockSqlDbtx_QueryContext_Call

type MockSqlDbtx_QueryRowContext_Call

type MockSqlDbtx_QueryRowContext_Call struct {
	*mock.Call
}

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

func (*MockSqlDbtx_QueryRowContext_Call) Return

func (*MockSqlDbtx_QueryRowContext_Call) Run

func (_c *MockSqlDbtx_QueryRowContext_Call) Run(run func(_a0 context.Context, _a1 string, _a2 ...interface{})) *MockSqlDbtx_QueryRowContext_Call

func (*MockSqlDbtx_QueryRowContext_Call) RunAndReturn

func (_c *MockSqlDbtx_QueryRowContext_Call) RunAndReturn(run func(context.Context, string, ...interface{}) *sql.Row) *MockSqlDbtx_QueryRowContext_Call

type SqlDbtx

type SqlDbtx interface {
	mysql_queries.DBTX

	BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
	Close() error
}

Jump to

Keyboard shortcuts

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