Documentation ¶
Index ¶
- func Bench(b *testing.B, bench func(b *testing.B, db satellite.DB))
- func CreateMasterDB(ctx context.Context, log *zap.Logger, name string, category string, index int, ...) (db satellite.DB, err error)
- func CreateMasterDBOnTopOf(ctx context.Context, log *zap.Logger, tempDB *dbutil.TempDatabase, ...) (db satellite.DB, err error)
- func CreateMetabaseDB(ctx context.Context, log *zap.Logger, name string, category string, index int, ...) (db *metabase.DB, err error)
- func CreateMetabaseDBOnTopOf(ctx context.Context, log *zap.Logger, tempDB *dbutil.TempDatabase, ...) (*metabase.DB, error)
- func FullTableScanQueries(ctx context.Context, db tagsql.DB, implementation dbutil.Implementation, ...) (queries []string, err error)
- func Run(t *testing.T, ...)
- func SchemaName(testname, category string, index int, schemaSuffix string) string
- func SchemaSuffix() string
- type Database
- type SatelliteDatabases
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bench ¶ added in v0.12.0
Bench method will iterate over all supported databases. Will establish connection and will create tables for each DB.
func CreateMasterDB ¶ added in v0.27.0
func CreateMasterDB(ctx context.Context, log *zap.Logger, name string, category string, index int, dbInfo Database, applicationName string) (db satellite.DB, err error)
CreateMasterDB creates a new satellite database for testing.
func CreateMasterDBOnTopOf ¶ added in v0.27.0
func CreateMasterDBOnTopOf(ctx context.Context, log *zap.Logger, tempDB *dbutil.TempDatabase, applicationName string) (db satellite.DB, err error)
CreateMasterDBOnTopOf creates a new satellite database on top of an already existing temporary database.
func CreateMetabaseDB ¶ added in v1.26.2
func CreateMetabaseDB(ctx context.Context, log *zap.Logger, name string, category string, index int, dbInfo Database, config metabase.Config) (db *metabase.DB, err error)
CreateMetabaseDB creates a new satellite metabase for testing.
func CreateMetabaseDBOnTopOf ¶ added in v1.26.2
func CreateMetabaseDBOnTopOf(ctx context.Context, log *zap.Logger, tempDB *dbutil.TempDatabase, config metabase.Config) (*metabase.DB, error)
CreateMetabaseDBOnTopOf creates a new metabase on top of an already existing temporary database.
func FullTableScanQueries ¶ added in v1.73.4
func FullTableScanQueries(ctx context.Context, db tagsql.DB, implementation dbutil.Implementation, applicationName string) (queries []string, err error)
FullTableScanQueries is a helper method to list all queries which performed full table scan recently. It works only for cockroach db.
func Run ¶
Run method will iterate over all supported databases. Will establish connection and will create tables for each DB.
func SchemaName ¶ added in v0.24.0
SchemaName returns a properly formatted schema string.
func SchemaSuffix ¶ added in v0.24.0
func SchemaSuffix() string
SchemaSuffix returns a suffix for schemas.
Types ¶
type SatelliteDatabases ¶ added in v0.23.0
SatelliteDatabases maybe name can be better.