testutils

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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) Cleanup

func (h *MemoryTestHelper) Cleanup() error

Cleanup 清理资源

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

func (h *MemoryTestHelper) InsertData(t *testing.T, tableName string, rows []domain.Row)

InsertData 插入测试数据

func (*MemoryTestHelper) QueryData

func (h *MemoryTestHelper) QueryData(t *testing.T, tableName string, options *domain.QueryOptions) *domain.QueryResult

QueryData 查询测试数据

Jump to

Keyboard shortcuts

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