Documentation ¶
Index ¶
- func CheckParams(t *testing.T, expected any, actual map[string]any)
- func CheckSql(t *testing.T, expected any, actual string)
- func Keys(m SliceMap) []any
- func MapKeys[K comparable, V any](m map[K]V) []K
- func MapValues[K comparable, V any](m map[K]V) []V
- func NextParameterName() string
- func ResetParameterIndex()
- func ToInt64(v any) (int64, error)
- func ToSliceMapSlice[K comparable, V any](values []map[K]V) []any
- func Values(m SliceMap) []any
- type ColumnsAwareStmt
- type Command
- type CommandStmt
- type Query
- type QueryStmt
- type SliceMap
- type Statement
- type StatementExecutor
- type StatementExecutorMock
- func (m *StatementExecutorMock) Column(sql string, params map[string]any) ([]any, error)
- func (m *StatementExecutorMock) Exec(sql string, params map[string]any) (int64, error)
- func (m *StatementExecutorMock) Insert(sql string, params map[string]any, sequence string) (any, error)
- func (m *StatementExecutorMock) MustColumn(sql string, params map[string]any) []any
- func (m *StatementExecutorMock) MustExec(sql string, params map[string]any) int64
- func (m *StatementExecutorMock) MustInsert(sql string, params map[string]any, sequence string) any
- func (m *StatementExecutorMock) MustOne(sql string, params map[string]any) any
- func (m *StatementExecutorMock) MustRow(sql string, params map[string]any) map[string]any
- func (m *StatementExecutorMock) MustRows(sql string, params map[string]any) []map[string]any
- func (m *StatementExecutorMock) One(sql string, params map[string]any) (any, error)
- func (m *StatementExecutorMock) Row(sql string, params map[string]any) (map[string]any, error)
- func (m *StatementExecutorMock) Rows(sql string, params map[string]any) ([]map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapKeys ¶ added in v0.0.3
func MapKeys[K comparable, V any](m map[K]V) []K
func MapValues ¶ added in v0.0.3
func MapValues[K comparable, V any](m map[K]V) []V
func NextParameterName ¶
func NextParameterName() string
func ResetParameterIndex ¶
func ResetParameterIndex()
func ToSliceMapSlice ¶ added in v0.0.3
func ToSliceMapSlice[K comparable, V any](values []map[K]V) []any
Types ¶
type ColumnsAwareStmt ¶
type CommandStmt ¶
type SliceMap ¶
type SliceMap []any
func ToSliceMap ¶ added in v0.0.3
func ToSliceMap[K comparable, V any](values map[K]V) SliceMap
type StatementExecutor ¶
type StatementExecutor interface { Exec(sql string, params map[string]any) (int64, error) MustExec(sql string, params map[string]any) int64 Insert(sql string, params map[string]any, sequence string) (any, error) MustInsert(sql string, params map[string]any, sequence string) any Rows(sql string, params map[string]any) ([]map[string]any, error) MustRows(sql string, params map[string]any) []map[string]any Row(sql string, params map[string]any) (map[string]any, error) MustRow(sql string, params map[string]any) map[string]any Column(sql string, params map[string]any) ([]any, error) MustColumn(sql string, params map[string]any) []any One(sql string, params map[string]any) (any, error) MustOne(sql string, params map[string]any) any }
type StatementExecutorMock ¶
type StatementExecutorMock struct{}
func NewStatementExecutorMock ¶
func NewStatementExecutorMock() *StatementExecutorMock
func (*StatementExecutorMock) MustColumn ¶ added in v0.0.9
func (m *StatementExecutorMock) MustColumn(sql string, params map[string]any) []any
func (*StatementExecutorMock) MustExec ¶ added in v0.0.9
func (m *StatementExecutorMock) MustExec(sql string, params map[string]any) int64
func (*StatementExecutorMock) MustInsert ¶ added in v0.0.9
func (*StatementExecutorMock) MustOne ¶ added in v0.0.9
func (m *StatementExecutorMock) MustOne(sql string, params map[string]any) any
Source Files ¶
Click to show internal directories.
Click to hide internal directories.