context

package
v1.1.0-beta.0...-a878e1f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyPlanContextExtended

type EmptyPlanContextExtended struct{}

EmptyPlanContextExtended is used to provide some empty implementations for PlanContext. It is used by some mock contexts that are only required to implement PlanContext but do not care about the actual implementation.

func (EmptyPlanContextExtended) AdviseTxnWarmup

func (EmptyPlanContextExtended) AdviseTxnWarmup() error

AdviseTxnWarmup advises the txn to warm up.

type PlanContext

type PlanContext interface {
	contextutil.ValueStoreContext
	tablelock.TableLockReadContext
	// GetSQLExecutor gets the SQLExecutor.
	GetSQLExecutor() sqlexec.SQLExecutor
	// GetRestrictedSQLExecutor gets the RestrictedSQLExecutor.
	GetRestrictedSQLExecutor() sqlexec.RestrictedSQLExecutor
	// GetExprCtx gets the expression context.
	GetExprCtx() exprctx.ExprContext
	// GetStore returns the store of session.
	GetStore() kv.Storage
	// GetSessionVars gets the session variables.
	GetSessionVars() *variable.SessionVars
	// GetDomainInfoSchema returns the latest information schema in domain
	// Different with `domain.InfoSchema()`, the information schema returned by this method
	// includes the temporary table definitions stored in session
	GetDomainInfoSchema() infoschema.MetaOnlyInfoSchema
	// GetInfoSchema returns the current infoschema
	GetInfoSchema() infoschema.MetaOnlyInfoSchema
	// UpdateColStatsUsage updates the column stats usage.
	UpdateColStatsUsage(predicateColumns []model.TableItemID)
	// GetClient gets a kv.Client.
	GetClient() kv.Client
	// GetMPPClient gets a kv.MPPClient.
	GetMPPClient() kv.MPPClient
	// GetSessionManager gets the session manager.
	GetSessionManager() util.SessionManager
	// Txn returns the current transaction which is created before executing a statement.
	// The returned kv.Transaction is not nil, but it maybe pending or invalid.
	// If the active parameter is true, call this function will wait for the pending txn
	// to become valid.
	Txn(active bool) (kv.Transaction, error)
	// HasDirtyContent checks whether there's dirty update on the given table.
	HasDirtyContent(tid int64) bool
	// AdviseTxnWarmup advises the txn to warm up.
	AdviseTxnWarmup() error
}

PlanContext is the context for building plan.

Jump to

Keyboard shortcuts

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