Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build() (*FileSorter, error)
- func (b *Builder) SetBuf(bufSize int) *Builder
- func (b *Builder) SetDesc(byDesc []bool) *Builder
- func (b *Builder) SetDir(tmpDir string) *Builder
- func (b *Builder) SetSC(sc *variable.StatementContext) *Builder
- func (b *Builder) SetSchema(keySize, valSize int) *Builder
- type FileSorter
- func (fs *FileSorter) Close() error
- func (fs *FileSorter) Input(key []types.Datum, val []types.Datum, handle int64) error
- func (fs *FileSorter) Len() int
- func (fs *FileSorter) Less(i, j int) bool
- func (fs *FileSorter) Output() ([]types.Datum, []types.Datum, int64, error)
- func (fs *FileSorter) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder builds a new FileSorter.
func (*Builder) Build ¶
func (b *Builder) Build() (*FileSorter, error)
Build creates a FileSorter instance using given data.
type FileSorter ¶
type FileSorter struct {
// contains filtered or unexported fields
}
FileSorter sorts the given rows according to the byDesc order. FileSorter can sort rows that exceed predefined memory capacity.
func (*FileSorter) Close ¶
func (fs *FileSorter) Close() error
Close terminates the input or output process and discards all remaining data.
func (*FileSorter) Input ¶
Input adds one row into FileSorter. Caller should not call Input after calling Output.
func (*FileSorter) Len ¶
func (fs *FileSorter) Len() int
Len implements sort.Interface Len interface.
func (*FileSorter) Less ¶
func (fs *FileSorter) Less(i, j int) bool
Less implements sort.Interface Less interface.
func (*FileSorter) Swap ¶
func (fs *FileSorter) Swap(i, j int)
Swap implements sort.Interface Swap interface.
Click to show internal directories.
Click to hide internal directories.