Documentation
¶
Index ¶
- type MemoryTestHelper
- func (h *MemoryTestHelper) Cleanup() error
- func (h *MemoryTestHelper) CreateTable(t *testing.T, tableInfo *domain.TableInfo)
- func (h *MemoryTestHelper) GetContext() context.Context
- func (h *MemoryTestHelper) GetDataSource() domain.DataSource
- func (h *MemoryTestHelper) InsertData(t *testing.T, tableName string, rows []domain.Row)
- func (h *MemoryTestHelper) QueryData(t *testing.T, tableName string, options *domain.QueryOptions) *domain.QueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryTestHelper ¶
type MemoryTestHelper struct {
// contains filtered or unexported fields
}
MemoryTestHelper 内存数据源测试辅助器 提供快速创建内存数据源、表和数据的能力
func NewMemoryTestHelper ¶
func NewMemoryTestHelper(t *testing.T) *MemoryTestHelper
NewMemoryTestHelper 创建内存测试辅助器 自动创建并连接内存数据源
func (*MemoryTestHelper) CreateTable ¶
func (h *MemoryTestHelper) CreateTable(t *testing.T, tableInfo *domain.TableInfo)
CreateTable 创建测试表
func (*MemoryTestHelper) GetContext ¶
func (h *MemoryTestHelper) GetContext() context.Context
GetContext 获取测试context
func (*MemoryTestHelper) GetDataSource ¶
func (h *MemoryTestHelper) GetDataSource() domain.DataSource
GetDataSource 获取数据源
func (*MemoryTestHelper) InsertData ¶
InsertData 插入测试数据
func (*MemoryTestHelper) QueryData ¶
func (h *MemoryTestHelper) QueryData(t *testing.T, tableName string, options *domain.QueryOptions) *domain.QueryResult
QueryData 查询测试数据
Click to show internal directories.
Click to hide internal directories.