Documentation
¶
Overview ¶
Package mocks provides mock implementations for testing sqlcredo components. It includes mock SQLExecutor and SQLResult types that implement the domain interfaces, allowing for isolated unit testing of database operations.
Index ¶
- type OnExecCb
- type OnSelectCb
- type SQLExecutor
- func (m *SQLExecutor) Exec(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (m *SQLExecutor) SelectMany(ctx context.Context, dest any, query string, args ...any) error
- func (m *SQLExecutor) SelectOne(ctx context.Context, dest any, query string, args ...any) error
- func (m *SQLExecutor) SetOnExecCb(cb OnExecCb)
- func (m *SQLExecutor) SetOnSelectManyCb(cb OnSelectCb)
- func (m *SQLExecutor) SetOnSelectOneCb(cb OnSelectCb)
- type SQLResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OnSelectCb ¶ added in v0.7.0
type SQLExecutor ¶
func NewSQLExecutor ¶
func NewSQLExecutor() *SQLExecutor
func (*SQLExecutor) SelectMany ¶
func (*SQLExecutor) SetOnExecCb ¶ added in v0.7.0
func (m *SQLExecutor) SetOnExecCb(cb OnExecCb)
func (*SQLExecutor) SetOnSelectManyCb ¶ added in v0.7.0
func (m *SQLExecutor) SetOnSelectManyCb(cb OnSelectCb)
func (*SQLExecutor) SetOnSelectOneCb ¶ added in v0.7.0
func (m *SQLExecutor) SetOnSelectOneCb(cb OnSelectCb)
type SQLResult ¶
type SQLResult struct {
// contains filtered or unexported fields
}
func NewSQLResult ¶
func (*SQLResult) LastInsertId ¶
func (*SQLResult) RowsAffected ¶
Click to show internal directories.
Click to hide internal directories.