enginetest

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ptr

func Ptr[T any](v T) *T

Ptr is a helper function that returns a pointer to the value passed in. This is necessary to e.g. get a pointer to a const value without assigning to an intermediate variable.

Types

type DoltgresHarness

type DoltgresHarness struct {
	// contains filtered or unexported fields
}

func (*DoltgresHarness) Close

func (d *DoltgresHarness) Close()

func (*DoltgresHarness) Engine

func (d *DoltgresHarness) Engine() *gms.Engine

func (*DoltgresHarness) NewContext

func (d *DoltgresHarness) NewContext() *sql.Context

func (*DoltgresHarness) NewContextWithClient

func (d *DoltgresHarness) NewContextWithClient(client sql.Client) *sql.Context

func (*DoltgresHarness) NewDatabaseProvider

func (d *DoltgresHarness) NewDatabaseProvider() sql.MutableDatabaseProvider

func (*DoltgresHarness) NewDatabases

func (d *DoltgresHarness) NewDatabases(names ...string) []sql.Database

func (*DoltgresHarness) NewEngine

func (d *DoltgresHarness) NewEngine(t *testing.T) (enginetest.QueryEngine, error)

NewEngine creates a new *gms.Engine or calls reset and clear scripts on the existing engine for reuse.

func (*DoltgresHarness) NewHarness

func (*DoltgresHarness) NewReadOnlyEngine

func (d *DoltgresHarness) NewReadOnlyEngine(provider sql.DatabaseProvider) (enginetest.QueryEngine, error)

func (*DoltgresHarness) NewSession

func (d *DoltgresHarness) NewSession() *sql.Context

func (*DoltgresHarness) NewTableAsOf

func (d *DoltgresHarness) NewTableAsOf(db sql.VersionedDatabase, name string, schema sql.PrimaryKeySchema, asOf interface{}) sql.Table

NewTableAsOf implements enginetest.VersionedHarness Dolt doesn't version tables per se, just the entire database. So ignore the name and schema and just create a new branch with the given name.

func (*DoltgresHarness) Parallelism

func (d *DoltgresHarness) Parallelism() int

func (*DoltgresHarness) Session

func (d *DoltgresHarness) Session() *dsess.DoltSession

func (*DoltgresHarness) Setup

func (d *DoltgresHarness) Setup(setupData ...[]setup.SetupScript)

Setup sets the setup scripts for this DoltHarness's engine

func (*DoltgresHarness) SkipQueryTest

func (d *DoltgresHarness) SkipQueryTest(query string) bool

SkipQueryTest returns whether to skip a query

func (*DoltgresHarness) SkipSetupCommit

func (d *DoltgresHarness) SkipSetupCommit()

func (*DoltgresHarness) SnapshotTable

func (d *DoltgresHarness) SnapshotTable(db sql.VersionedDatabase, tableName string, asOf interface{}) error

SnapshotTable implements enginetest.VersionedHarness Dolt doesn't version tables per se, just the entire database. So ignore the name and schema and just create a new branch with the given name.

func (*DoltgresHarness) SupportsForeignKeys

func (d *DoltgresHarness) SupportsForeignKeys() bool

func (*DoltgresHarness) SupportsKeylessTables

func (d *DoltgresHarness) SupportsKeylessTables() bool

func (*DoltgresHarness) SupportsNativeIndexCreation

func (d *DoltgresHarness) SupportsNativeIndexCreation() bool

func (*DoltgresHarness) UseLocalFileSystem

func (d *DoltgresHarness) UseLocalFileSystem()

func (*DoltgresHarness) ValidateEngine

func (d *DoltgresHarness) ValidateEngine(ctx *sql.Context, e *gms.Engine) error

func (*DoltgresHarness) WithConfigureStats

func (d *DoltgresHarness) WithConfigureStats(configureStats bool) denginetest.DoltEnginetestHarness

func (*DoltgresHarness) WithParallelism

func (d *DoltgresHarness) WithParallelism(parallelism int) denginetest.DoltEnginetestHarness

WithParallelism returns a copy of the harness with parallelism set to the given number of threads. A value of 0 or less means to use the system parallelism settings.

func (*DoltgresHarness) WithSkippedQueries

func (d *DoltgresHarness) WithSkippedQueries(queries []string) denginetest.DoltEnginetestHarness

WithSkippedQueries returns a copy of the harness with the given queries skipped

type DoltgresQueryEngine

type DoltgresQueryEngine struct {
	// contains filtered or unexported fields
}

func NewDoltgresQueryEngine

func NewDoltgresQueryEngine(t *testing.T, harness *DoltgresHarness) *DoltgresQueryEngine

func (DoltgresQueryEngine) AnalyzeQuery

func (d DoltgresQueryEngine) AnalyzeQuery(s *sql.Context, s2 string) (sql.Node, error)

func (DoltgresQueryEngine) Close

func (d DoltgresQueryEngine) Close() error

func (DoltgresQueryEngine) CloseSession

func (d DoltgresQueryEngine) CloseSession(connID uint32)

func (DoltgresQueryEngine) EngineAnalyzer

func (d DoltgresQueryEngine) EngineAnalyzer() *analyzer.Analyzer

func (DoltgresQueryEngine) EnginePreparedDataCache

func (d DoltgresQueryEngine) EnginePreparedDataCache() *gms.PreparedDataCache

func (DoltgresQueryEngine) PrepareQuery

func (d DoltgresQueryEngine) PrepareQuery(s *sql.Context, s2 string) (sql.Node, error)

func (DoltgresQueryEngine) Query

func (d DoltgresQueryEngine) Query(ctx *sql.Context, query string) (sql.Schema, sql.RowIter, error)

func (DoltgresQueryEngine) QueryWithBindings

func (d DoltgresQueryEngine) QueryWithBindings(ctx *sql.Context, query string, parsed vitess.Statement, bindings map[string]*query.BindVariable) (sql.Schema, sql.RowIter, error)

Jump to

Keyboard shortcuts

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