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 ¶
ReportCursorRUV2Delta reports any pending cursor RUv2 delta if supported. resultChunkCellsDelta is added to the cursor tracker before reporting.
Types ¶
type CursorRUV2Tracker ¶
type CursorRUV2Tracker struct {
// contains filtered or unexported fields
}
CursorRUV2Tracker keeps reporting state for server-side cursor fetches.
func NewCursorRUV2Tracker ¶
func NewCursorRUV2Tracker( reporter resourcegroup.ConsumptionReporter, resourceGroupName string, metrics *execdetails.RUV2Metrics, ruDetails *clientutil.RUDetails, weights execdetails.RUV2Weights, ) *CursorRUV2Tracker
NewCursorRUV2Tracker creates a tracker that reports cursor fetch deltas.
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.