Documentation
¶
Index ¶
- Constants
- func AllCheckpointsFinished(e *db.DB) bool
- func Append(t *testing.T, accountID uint32, db *db.DB, dbName, tableName string, ...)
- 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, end types.TS, c *catalog.Catalog, checkpointSize 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 CreateDatabase2(ctx context.Context, txn txnif.AsyncTxn, dbName string) (handle.Database, error)
- func CreateDatabase2Ext(ctx context.Context, txn txnif.AsyncTxn, dbName, createsql, dattype string) (handle.Database, error)
- func CreateOneDatabase(ctx context.Context, t *testing.T, tae *db.DB, i int) (name string)
- func CreateRelation(t *testing.T, e *db.DB, dbName string, schema *catalog.Schema, createDB bool) (db handle.Database, rel handle.Relation)
- func CreateRelation2(ctx context.Context, txn txnif.AsyncTxn, db handle.Database, ...) (handle.Relation, error)
- func CreateRelationAndAppend(t *testing.T, tenantID uint32, e *db.DB, dbName string, schema *catalog.Schema, ...)
- func CreateRelationAndAppend2(t *testing.T, tenantID uint32, e *db.DB, dbName string, schema *catalog.Schema, ...)
- 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 DeleteAll(t *testing.T, accountID uint32, db *db.DB, dbName, tableName string)
- func DropDB(t *testing.T, e *db.DB, dbName string)
- func DropDatabase2(ctx context.Context, txn txnif.AsyncTxn, dbName string) error
- func DropRelation2(ctx context.Context, txn txnif.AsyncTxn, db handle.Database, tblName string) error
- func ForEachColumnView(t *testing.T, rel handle.Relation, colIdx int, ...)
- func ForEachObject(t *testing.T, rel handle.Relation, fn func(obj handle.Object) error)
- func ForEachTombstone(t *testing.T, rel handle.Relation, fn func(obj handle.Object) error)
- func GetAllAppendableMetas(rel handle.Relation, isTombstone bool) (metas []*catalog.ObjectEntry)
- func GetAllBlockMetas(rel handle.Relation, isTombstone bool) (metas []*catalog.ObjectEntry)
- 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 GetOneBlockMeta(rel handle.Relation) *catalog.ObjectEntry
- func GetOneObject(rel handle.Relation) handle.Object
- func GetOneTombstoneMeta(rel handle.Relation) *catalog.ObjectEntry
- 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 IsCatalogEqual(t *testing.T, c1, c2 *catalog.Catalog)
- func LenOfBats(bats []*containers.Batch) int
- func MergeBlocks(t *testing.T, tenantID uint32, e *db.DB, dbName string, schema *catalog.Schema, ...)
- func MockCNDeleteInS3(fs fileservice.FileService, rowIDVec containers.Vector, ...) (stats objectio.ObjectStats, err error)
- func MockObjectStats(t *testing.T, obj handle.Object)
- 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 NewReplayTestEngine(ctx context.Context, moduleName string, t *testing.T, opts *options.Options) *TestEngine
- func NewTestEngine(ctx context.Context, moduleName string, t *testing.T, opts *options.Options, ...) *TestEngine
- func NewTestEngineWithDir(ctx context.Context, dir string, t *testing.T, opts *options.Options) *TestEngine
- func (e *TestEngine) AllCheckpointsFinished() bool
- func (e *TestEngine) AllFlushExpected(ts types.TS, timeoutMS int)
- func (e *TestEngine) BindSchema(schema *catalog.Schema)
- func (e *TestEngine) BindTenantID(tenantID uint32)
- func (e *TestEngine) CheckCollectTombstoneInRange()
- 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)
- func (e *TestEngine) CreateRelAndAppend2(bat *containers.Batch, createDB bool)
- 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) ForceLongCheckpointTruncate()
- 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) MergeBlocks(skipConflict bool)
- func (e *TestEngine) Restart(ctx context.Context, opts ...*options.Options)
- func (e *TestEngine) RestartDisableGC(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 AllCheckpointsFinished ¶
func AppendClosure ¶
func AppendFailClosure ¶
func CheckAllColRowsByScan ¶
func CheckCheckpointReadWrite ¶
func CheckCheckpointReadWrite( t *testing.T, end types.TS, c *catalog.Catalog, checkpointSize int, e *TestEngine, )
TODO: use ctx
func CompactBlocks ¶
func CreateDatabase2 ¶
func CreateDatabase2Ext ¶
func CreateOneDatabase ¶
func CreateRelation ¶
func CreateRelation2 ¶
func CreateRelationAndAppend ¶
func CreateRelationNoCommit ¶
func DropDatabase2 ¶
func DropRelation2 ¶
func ForEachColumnView ¶
func ForEachObject ¶ added in v1.1.0
func ForEachTombstone ¶
func GetAllAppendableMetas ¶
func GetAllAppendableMetas(rel handle.Relation, isTombstone bool) (metas []*catalog.ObjectEntry)
func GetAllBlockMetas ¶
func GetAllBlockMetas(rel handle.Relation, isTombstone bool) (metas []*catalog.ObjectEntry)
func GetColumnRowsByScan ¶
func GetDefaultRelation ¶
func GetOneBlockMeta ¶
func GetOneBlockMeta(rel handle.Relation) *catalog.ObjectEntry
GetOneBlockMeta returns the oldest visible object's meta in the relation
func GetOneObject ¶ added in v1.2.0
GetOneObject returns the newest visible object in the relation
func GetOneTombstoneMeta ¶
func GetOneTombstoneMeta(rel handle.Relation) *catalog.ObjectEntry
func GetRelation ¶
func GetRelationWithTxn ¶
func GetSingleSortKeyValue ¶
func InitTestDB ¶
func InitTestDBWithDir ¶
func LenOfBats ¶
func LenOfBats(bats []*containers.Batch) int
func MergeBlocks ¶
func MockCNDeleteInS3 ¶
func MockCNDeleteInS3( fs fileservice.FileService, rowIDVec containers.Vector, pkVec containers.Vector, schema *catalog.Schema, txn txnif.AsyncTxn, ) (stats objectio.ObjectStats, err error)
Types ¶
type CtxOldVersion ¶
type CtxOldVersion struct{}
type TestEngine ¶
func NewReplayTestEngine ¶
func NewTestEngine ¶
func NewTestEngineWithDir ¶
func (*TestEngine) AllCheckpointsFinished ¶
func (e *TestEngine) AllCheckpointsFinished() bool
func (*TestEngine) AllFlushExpected ¶
func (e *TestEngine) AllFlushExpected(ts types.TS, timeoutMS int)
func (*TestEngine) BindSchema ¶
func (e *TestEngine) BindSchema(schema *catalog.Schema)
func (*TestEngine) BindTenantID ¶
func (e *TestEngine) BindTenantID(tenantID uint32)
func (*TestEngine) CheckCollectTombstoneInRange ¶
func (e *TestEngine) CheckCollectTombstoneInRange()
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)
func (*TestEngine) CreateRelAndAppend2 ¶
func (e *TestEngine) CreateRelAndAppend2(bat *containers.Batch, createDB bool)
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) ForceLongCheckpointTruncate ¶
func (e *TestEngine) ForceLongCheckpointTruncate()
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) MergeBlocks ¶
func (e *TestEngine) MergeBlocks(skipConflict bool)
func (*TestEngine) Restart ¶
func (e *TestEngine) Restart(ctx context.Context, opts ...*options.Options)
func (*TestEngine) RestartDisableGC ¶ added in v1.2.0
func (e *TestEngine) RestartDisableGC(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.