temptable

package
v0.0.0-...-503c688 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachLocalTemporaryTableInfoSchema

func AttachLocalTemporaryTableInfoSchema(sctx sessionctx.Context, is infoschema.InfoSchema) infoschema.InfoSchema

AttachLocalTemporaryTableInfoSchema attach local temporary table information schema to is

func DetachLocalTemporaryTableInfoSchema

func DetachLocalTemporaryTableInfoSchema(is infoschema.InfoSchema) infoschema.InfoSchema

DetachLocalTemporaryTableInfoSchema detach local temporary table information schema from is

func SessionSnapshotInterceptor

func SessionSnapshotInterceptor(sctx sessionctx.Context, is infoschema.InfoSchema) kv.SnapshotInterceptor

SessionSnapshotInterceptor creates a new snapshot interceptor for temporary table data fetch

Types

type TemporaryTableDDL

type TemporaryTableDDL interface {
	CreateLocalTemporaryTable(db *model.DBInfo, info *model.TableInfo) error
	DropLocalTemporaryTable(schema model.CIStr, tblName model.CIStr) error
	TruncateLocalTemporaryTable(schema model.CIStr, tblName model.CIStr) error
}

TemporaryTableDDL is an interface providing ddl operations for temporary table

func GetTemporaryTableDDL

func GetTemporaryTableDDL(sctx sessionctx.Context) TemporaryTableDDL

GetTemporaryTableDDL gets the temptable.TemporaryTableDDL from session context

type TemporaryTableSnapshotInterceptor

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

TemporaryTableSnapshotInterceptor implements kv.SnapshotInterceptor

func NewTemporaryTableSnapshotInterceptor

func NewTemporaryTableSnapshotInterceptor(is infoschema.InfoSchema, sessionData kv.Retriever) *TemporaryTableSnapshotInterceptor

NewTemporaryTableSnapshotInterceptor creates a new TemporaryTableSnapshotInterceptor

func (*TemporaryTableSnapshotInterceptor) OnBatchGet

func (i *TemporaryTableSnapshotInterceptor) OnBatchGet(ctx context.Context, snap kv.Snapshot, keys []kv.Key) (map[string][]byte, error)

OnBatchGet intercepts BatchGet operation for Snapshot

func (*TemporaryTableSnapshotInterceptor) OnGet

OnGet intercepts Get operation for Snapshot

func (*TemporaryTableSnapshotInterceptor) OnIter

func (i *TemporaryTableSnapshotInterceptor) OnIter(snap kv.Snapshot, k kv.Key, upperBound kv.Key) (kv.Iterator, error)

OnIter intercepts Iter operation for Snapshot

func (*TemporaryTableSnapshotInterceptor) OnIterReverse

func (i *TemporaryTableSnapshotInterceptor) OnIterReverse(snap kv.Snapshot, k kv.Key) (kv.Iterator, error)

OnIterReverse intercepts IterReverse operation for Snapshot

Jump to

Keyboard shortcuts

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