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) 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) Insert(sql string, params map[string]any, sequence string) (any, error) Rows(sql string, params map[string]any) ([]map[string]any, error) Row(sql string, params map[string]any) (map[string]any, error) Column(sql string, params map[string]any) ([]any, error) One(sql string, params map[string]any) (any, error) }
type StatementExecutorMock ¶
type StatementExecutorMock struct{}
func NewStatementExecutorMock ¶
func NewStatementExecutorMock() *StatementExecutorMock
Source Files ¶
Click to show internal directories.
Click to hide internal directories.