Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachCursorRUV2Tracker ¶
func AttachCursorRUV2Tracker(rs ResultSet, tracker *CursorRUV2Tracker)
AttachCursorRUV2Tracker binds a cursor tracker to the result set if supported.
func ReportCursorRUV2Delta ¶
func ReportCursorRUV2Delta(rs ResultSet)
ReportCursorRUV2Delta synchronizes pending cursor response bytes for RU v3 if supported.
Types ¶
type CursorRUV2Tracker ¶
type CursorRUV2Tracker struct {
// contains filtered or unexported fields
}
CursorRUV2Tracker synchronizes cursor response bytes used by RU v3.
func NewCursorRUV2Tracker ¶
func NewCursorRUV2Tracker( metrics *execdetails.RUV2Metrics, ruDetails *clientutil.RUDetails, ) *CursorRUV2Tracker
NewCursorRUV2Tracker creates a tracker for cursor response bytes.
type CursorResultSet ¶
type CursorResultSet interface {
ResultSet
GetRowIterator() RowIterator
}
CursorResultSet extends the `ResultSet` to provide the ability to store an iterator
func WrapWithLazyCursor ¶
func WrapWithLazyCursor(rs ResultSet, capacity, maxChunkSize int) CursorResultSet
WrapWithLazyCursor wraps a ResultSet into a CursorResultSet
func WrapWithRowContainerCursor ¶
func WrapWithRowContainerCursor(rs ResultSet, rowContainer chunk.RowContainerReader) CursorResultSet
WrapWithRowContainerCursor wraps a ResultSet into a CursorResultSet
type FetchNotifier ¶
type FetchNotifier interface {
// OnFetchReturned be called when COM_FETCH returns.
// it will be used in server-side cursor.
OnFetchReturned()
}
FetchNotifier represents notifier will be called in COM_FETCH.
type ResultSet ¶
type ResultSet interface {
Columns() []*column.Info
NewChunk(chunk.Allocator) *chunk.Chunk
Next(context.Context, *chunk.Chunk) error
Close()
// IsClosed checks whether the result set is closed.
IsClosed() bool
FieldTypes() []*types.FieldType
SetPreparedStmt(stmt *core.PlanCacheStmt)
Finish() error
TryDetach() (ResultSet, bool, error)
}
ResultSet is the result set of an query.
type RowIterator ¶
type RowIterator interface {
// Next returns the next Row.
Next(context.Context) chunk.Row
// Current returns the current Row.
Current(context.Context) chunk.Row
// End returns the invalid end Row.
End() chunk.Row
// Error returns none-nil error if anything wrong happens during the iteration.
Error() error
// Close closes the dumper
Close()
}
RowIterator has similar method with `chunk.RowContainerReader`. The only difference is that it needs a `context.Context` for the `Next` and `Current` method.