Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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.
Click to show internal directories.
Click to hide internal directories.