Documentation ¶
Index ¶
- Constants
- func AppendClosure(t *testing.T, data *containers.Batch, name string, e *db.DB, ...) func()
- func AppendFailClosure(t *testing.T, data *containers.Batch, name string, e *db.DB, ...) func()
- func CheckAllColRowsByScan(t *testing.T, rel handle.Relation, expectRows int, applyDelete bool)
- func CheckCheckpointReadWrite(t *testing.T, start, end types.TS, c *catalog.Catalog, checkpointBlockRows int, ...)
- func CompactBlocks(t *testing.T, tenantID uint32, e *db.DB, dbName string, schema *catalog.Schema, ...)
- func CreateDB(t *testing.T, e *db.DB, dbName string)
- func CreateRelation(t *testing.T, e *db.DB, dbName string, schema *catalog.Schema, createDB bool) (db handle.Database, rel handle.Relation)
- func CreateRelationAndAppend(t *testing.T, tenantID uint32, e *db.DB, dbName string, schema *catalog.Schema, ...) (db handle.Database, rel handle.Relation)
- func CreateRelationNoCommit(t *testing.T, e *db.DB, dbName string, schema *catalog.Schema, createDB bool) (txn txnif.AsyncTxn, db handle.Database, rel handle.Relation)
- func DropDB(t *testing.T, e *db.DB, dbName string)
- func ForEachBlock(rel handle.Relation, fn func(blk handle.Block) error)
- func ForEachColumnView(rel handle.Relation, colIdx int, fn func(view *containers.ColumnView) error)
- func ForEachSegment(rel handle.Relation, fn func(seg handle.Segment) error)
- func GetAllBlockMetas(rel handle.Relation) (metas []*catalog.BlockEntry)
- func GetColumnRowsByScan(t *testing.T, rel handle.Relation, colIdx int, applyDelete bool) int
- func GetDefaultRelation(t *testing.T, e *db.DB, name string) (txn txnif.AsyncTxn, rel handle.Relation)
- func GetOneBlock(rel handle.Relation) handle.Block
- func GetOneBlockMeta(rel handle.Relation) *catalog.BlockEntry
- func GetRelation(t *testing.T, tenantID uint32, e *db.DB, dbName, tblName string) (txn txnif.AsyncTxn, rel handle.Relation)
- func GetRelationWithTxn(t *testing.T, txn txnif.AsyncTxn, dbName, tblName string) (rel handle.Relation)
- func GetSingleSortKeyValue(bat *containers.Batch, schema *catalog.Schema, row int) (v any)
- func InitTestDB(ctx context.Context, moduleName string, t *testing.T, opts *options.Options) *db.DB
- func InitTestDBWithDir(ctx context.Context, dir string, t *testing.T, opts *options.Options) *db.DB
- func LenOfBats(bats []*containers.Batch) int
- func MergeBlocks(t *testing.T, tenantID uint32, e *db.DB, dbName string, schema *catalog.Schema, ...)
- func MockCNDeleteInS3(fs *objectio.ObjectFS, blk data.Block, schema *catalog.Schema, ...) (location objectio.Location, err error)
- func PrintCheckpointStats(t *testing.T, tae *db.DB)
- func WithTestAllPKType(t *testing.T, tae *db.DB, test func(*testing.T, *db.DB, *catalog.Schema))
- type CtxOldVersion
- type TestEngine
- func (e *TestEngine) BindSchema(schema *catalog.Schema)
- func (e *TestEngine) BindTenantID(tenantID uint32)
- func (e *TestEngine) CheckCollectDeleteInRange()
- func (e *TestEngine) CheckReadCNCheckpoint()
- func (e *TestEngine) CheckRowsByScan(exp int, applyDelete bool)
- func (e *TestEngine) Close() error
- func (e *TestEngine) CompactBlocks(skipConflict bool)
- func (e *TestEngine) CreateRelAndAppend(bat *containers.Batch, createDB bool) (handle.Database, handle.Relation)
- func (e *TestEngine) DeleteAll(skipConflict bool) error
- func (e *TestEngine) DoAppend(bat *containers.Batch)
- func (e *TestEngine) DoAppendWithTxn(bat *containers.Batch, txn txnif.AsyncTxn, skipConflict bool) (err error)
- func (e *TestEngine) DropRelation(t *testing.T)
- func (e *TestEngine) ForceCheckpoint()
- func (e *TestEngine) ForceLongCheckpoint()
- func (e *TestEngine) GetDB(name string) (txn txnif.AsyncTxn, db handle.Database)
- func (e *TestEngine) GetRelation() (txn txnif.AsyncTxn, rel handle.Relation)
- func (e *TestEngine) GetRelationWithTxn(txn txnif.AsyncTxn) (rel handle.Relation)
- func (e *TestEngine) GetTestDB() (txn txnif.AsyncTxn, db handle.Database)
- func (e *TestEngine) GlobalCheckpoint(endTs types.TS, versionInterval time.Duration, enableAndCleanBGCheckpoint bool) error
- func (e *TestEngine) IncrementalCheckpoint(end types.TS, enableAndCleanBGCheckpoint bool, waitFlush bool, truncate bool) error
- func (e *TestEngine) MergeBlocks(skipConflict bool)
- func (e *TestEngine) Restart(ctx context.Context)
- func (e *TestEngine) Truncate()
- func (e *TestEngine) TryAppend(bat *containers.Batch)
- func (e *TestEngine) TryDeleteByDeltaloc(vals []any) (ok bool, err error)
- func (e *TestEngine) TryDeleteByDeltalocWithTxn(vals []any, txn txnif.AsyncTxn) (ok bool, err error)
Constants ¶
View Source
const (
DefaultTestDB = "db"
)
Variables ¶
This section is empty.
Functions ¶
func AppendClosure ¶
func AppendFailClosure ¶
func CheckAllColRowsByScan ¶
func CheckCheckpointReadWrite ¶
func CheckCheckpointReadWrite( t *testing.T, start, end types.TS, c *catalog.Catalog, checkpointBlockRows int, checkpointSize int, fs fileservice.FileService, )
func CompactBlocks ¶
func CreateRelation ¶
func CreateRelationAndAppend ¶
func CreateRelationNoCommit ¶
func ForEachColumnView ¶
func ForEachColumnView(rel handle.Relation, colIdx int, fn func(view *containers.ColumnView) error)
func GetAllBlockMetas ¶
func GetAllBlockMetas(rel handle.Relation) (metas []*catalog.BlockEntry)
func GetColumnRowsByScan ¶
func GetDefaultRelation ¶
func GetOneBlockMeta ¶
func GetOneBlockMeta(rel handle.Relation) *catalog.BlockEntry
func GetRelation ¶
func GetRelationWithTxn ¶
func GetSingleSortKeyValue ¶
func InitTestDB ¶
func InitTestDBWithDir ¶
func LenOfBats ¶
func LenOfBats(bats []*containers.Batch) int
func MergeBlocks ¶
func MockCNDeleteInS3 ¶
Types ¶
type CtxOldVersion ¶
type CtxOldVersion struct{}
type TestEngine ¶
func NewTestEngine ¶
func NewTestEngineWithDir ¶
func (*TestEngine) BindSchema ¶
func (e *TestEngine) BindSchema(schema *catalog.Schema)
func (*TestEngine) BindTenantID ¶
func (e *TestEngine) BindTenantID(tenantID uint32)
func (*TestEngine) CheckCollectDeleteInRange ¶
func (e *TestEngine) CheckCollectDeleteInRange()
func (*TestEngine) CheckReadCNCheckpoint ¶
func (e *TestEngine) CheckReadCNCheckpoint()
func (*TestEngine) CheckRowsByScan ¶
func (e *TestEngine) CheckRowsByScan(exp int, applyDelete bool)
func (*TestEngine) Close ¶
func (e *TestEngine) Close() error
func (*TestEngine) CompactBlocks ¶
func (e *TestEngine) CompactBlocks(skipConflict bool)
func (*TestEngine) CreateRelAndAppend ¶
func (e *TestEngine) CreateRelAndAppend(bat *containers.Batch, createDB bool) (handle.Database, handle.Relation)
func (*TestEngine) DeleteAll ¶
func (e *TestEngine) DeleteAll(skipConflict bool) error
func (*TestEngine) DoAppend ¶
func (e *TestEngine) DoAppend(bat *containers.Batch)
func (*TestEngine) DoAppendWithTxn ¶
func (e *TestEngine) DoAppendWithTxn(bat *containers.Batch, txn txnif.AsyncTxn, skipConflict bool) (err error)
func (*TestEngine) DropRelation ¶
func (e *TestEngine) DropRelation(t *testing.T)
func (*TestEngine) ForceCheckpoint ¶
func (e *TestEngine) ForceCheckpoint()
func (*TestEngine) ForceLongCheckpoint ¶
func (e *TestEngine) ForceLongCheckpoint()
func (*TestEngine) GetRelation ¶
func (e *TestEngine) GetRelation() (txn txnif.AsyncTxn, rel handle.Relation)
func (*TestEngine) GetRelationWithTxn ¶
func (e *TestEngine) GetRelationWithTxn(txn txnif.AsyncTxn) (rel handle.Relation)
func (*TestEngine) GetTestDB ¶
func (e *TestEngine) GetTestDB() (txn txnif.AsyncTxn, db handle.Database)
func (*TestEngine) GlobalCheckpoint ¶
func (*TestEngine) IncrementalCheckpoint ¶
func (*TestEngine) MergeBlocks ¶
func (e *TestEngine) MergeBlocks(skipConflict bool)
func (*TestEngine) Restart ¶
func (e *TestEngine) Restart(ctx context.Context)
func (*TestEngine) Truncate ¶
func (e *TestEngine) Truncate()
func (*TestEngine) TryAppend ¶
func (e *TestEngine) TryAppend(bat *containers.Batch)
func (*TestEngine) TryDeleteByDeltaloc ¶
func (e *TestEngine) TryDeleteByDeltaloc(vals []any) (ok bool, err error)
func (*TestEngine) TryDeleteByDeltalocWithTxn ¶
Click to show internal directories.
Click to hide internal directories.