Documentation ¶
Index ¶
- func ExecMultiSQLInGoroutine(s kv.Storage, dbName string, multiSQL []string, done chan error)
- func ExtractAllTableHandles(se sessiontypes.Session, dbName, tbName string) ([]int64, error)
- func FindIdxInfo(dom *domain.Domain, dbName, tbName, idxName string) *model.IndexInfo
- func SessionExecInGoroutine(s kv.Storage, dbName, sql string, done chan error)
- func TestMatchCancelState(t *testing.T, job *model.Job, cancelState any, sql string) bool
- type OperatorTestSink
- type OperatorTestSource
- type SubStates
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecMultiSQLInGoroutine ¶
ExecMultiSQLInGoroutine exports for testing.
func ExtractAllTableHandles ¶
func ExtractAllTableHandles(se sessiontypes.Session, dbName, tbName string) ([]int64, error)
ExtractAllTableHandles extracts all handles of a given table.
func FindIdxInfo ¶
FindIdxInfo is to get IndexInfo by index name.
func SessionExecInGoroutine ¶
SessionExecInGoroutine export for testing.
Types ¶
type OperatorTestSink ¶
type OperatorTestSink[T any] struct { // contains filtered or unexported fields }
OperatorTestSink is used for dist task operator test.
func NewOperatorTestSink ¶
func NewOperatorTestSink[T any]() *OperatorTestSink[T]
NewOperatorTestSink creates a new OperatorTestSink.
func (*OperatorTestSink[T]) Close ¶
func (s *OperatorTestSink[T]) Close() error
Close implements disttask/operator.Operator.
func (*OperatorTestSink[T]) Collect ¶
func (s *OperatorTestSink[T]) Collect() []T
Collect the result from OperatorTestSink.
func (*OperatorTestSink[T]) Open ¶
func (s *OperatorTestSink[T]) Open() error
Open implements disttask/operator.Operator.
func (*OperatorTestSink[T]) SetSource ¶
func (s *OperatorTestSink[T]) SetSource(dataCh operator.DataChannel[T])
SetSource implements disttask/operator.Operator.
func (*OperatorTestSink[T]) String ¶
func (*OperatorTestSink[T]) String() string
String implements disttask/operator.Operator.
type OperatorTestSource ¶
type OperatorTestSource[T any] struct { // contains filtered or unexported fields }
OperatorTestSource is used for dist task operator test.
func NewOperatorTestSource ¶
func NewOperatorTestSource[T any](toBeSent ...T) *OperatorTestSource[T]
NewOperatorTestSource creates a new OperatorTestSource.
func (*OperatorTestSource[T]) Close ¶
func (s *OperatorTestSource[T]) Close() error
Close implements disttask/operator.Operator.
func (*OperatorTestSource[T]) Open ¶
func (s *OperatorTestSource[T]) Open() error
Open implements disttask/operator.Operator.
func (*OperatorTestSource[T]) SetSink ¶
func (s *OperatorTestSource[T]) SetSink(sink operator.DataChannel[T])
SetSink implements disttask/operator.Operator.
func (*OperatorTestSource[T]) String ¶
func (*OperatorTestSource[T]) String() string
String implements disttask/operator.Operator.