distsql

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2018 License: Apache-2.0 Imports: 12 Imported by: 422

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PartialResult

type PartialResult interface {
	// Next returns the next rowData of the sub result.
	// If no more row to return, rowData would be nil.
	Next(context.Context) (rowData []types.Datum, err error)
	// Close closes the partial result.
	Close() error
}

PartialResult is the result from a single region server.

type SelectResult

type SelectResult interface {
	// Next gets the next partial result.
	Next(context.Context) (PartialResult, error)
	// NextRaw gets the next raw result.
	NextRaw(context.Context) ([]byte, error)
	// NextChunk reads the data into chunk.
	NextChunk(context.Context, *chunk.Chunk) error
	// Close closes the iterator.
	Close() error
	// Fetch fetches partial results from client.
	// The caller should call SetFields() before call Fetch().
	Fetch(context.Context)
	// ScanKeys gets the total scan row count.
	ScanKeys() int64
}

SelectResult is an iterator of coprocessor partial results.

func Analyze

func Analyze(ctx context.Context, client kv.Client, kvReq *kv.Request) (SelectResult, error)

Analyze do a analyze request.

func Select

func Select(ctx context.Context, sctx sessionctx.Context, kvReq *kv.Request, fieldTypes []*types.FieldType) (SelectResult, error)

Select sends a DAG request, returns SelectResult. In kvReq, KeyRanges is required, Concurrency/KeepOrder/Desc/IsolationLevel/Priority are optional.

Jump to

Keyboard shortcuts

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