Documentation ¶
Index ¶
- func NewRows(from, to int) []core.Row
- type Adapter
- type AdapterOption
- func AdapterWithQuerySideEffect(query string, sideEffect func(context.Context) error) AdapterOption
- func AdapterWithResultStreamOpts(opts ...ResultStreamOption) AdapterOption
- func AdapterWithTableDefinition(table string, columns []*core.Column) AdapterOption
- func AdapterWithTableHelper(name string, query string) AdapterOption
- type ResultStream
- type ResultStreamOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func NewAdapter ¶
func NewAdapter(data []core.Row, opts ...AdapterOption) *Adapter
func (*Adapter) GetHelpers ¶
func (a *Adapter) GetHelpers(opts *core.TableOptions) map[string]string
type AdapterOption ¶
type AdapterOption func(*adapterConfig)
func AdapterWithQuerySideEffect ¶
func AdapterWithQuerySideEffect(query string, sideEffect func(context.Context) error) AdapterOption
func AdapterWithResultStreamOpts ¶
func AdapterWithResultStreamOpts(opts ...ResultStreamOption) AdapterOption
func AdapterWithTableDefinition ¶
func AdapterWithTableDefinition(table string, columns []*core.Column) AdapterOption
func AdapterWithTableHelper ¶
func AdapterWithTableHelper(name string, query string) AdapterOption
type ResultStream ¶
type ResultStream struct {
// contains filtered or unexported fields
}
func NewResultStream ¶
func NewResultStream(rows []core.Row, opts ...ResultStreamOption) *ResultStream
NewResultStream returns a mocked result stream with provided rows. It creates a header that matches the number of columns in the first row in form of: <header_0>, <header_1>, etc.
func (*ResultStream) Close ¶
func (rs *ResultStream) Close()
func (*ResultStream) HasNext ¶
func (rs *ResultStream) HasNext() bool
func (*ResultStream) Header ¶
func (rs *ResultStream) Header() core.Header
func (*ResultStream) Meta ¶
func (rs *ResultStream) Meta() *core.Meta
type ResultStreamOption ¶
type ResultStreamOption func(*resultStreamConfig)
func ResultStreamWithHeader ¶
func ResultStreamWithHeader(header core.Header) ResultStreamOption
func ResultStreamWithMeta ¶
func ResultStreamWithMeta(meta *core.Meta) ResultStreamOption
func ResultStreamWithNextSleep ¶
func ResultStreamWithNextSleep(s time.Duration) ResultStreamOption
Click to show internal directories.
Click to hide internal directories.