Documentation
¶
Index ¶
- Variables
- func DiscardValuer() sql.Scanner
- func Loop(scanner Scanner, columns []string, it Iterator, initializer RowInitializer, ...) (err error)
- func RawRowScanner(dst []any)
- func RawValueScanner(dst []any, index int) sql.Scanner
- func SqlRowsLoop(rows *sql.Rows, it Iterator, factory RowFactory, cb func(record any) error) (err error)
- type Iterator
- type IteratorFunc
- type Map
- func (s *Map) Factory(columns []string) RowInitializer
- func (r *Map) IgnoreUndefineds() *Map
- func (r *Map) IsIgnoreUndefineds() bool
- func (r *Map) NewInitializer(columns []string) RowInitializer
- func (r *Map) Pipe(to func(next RowsHandler) RowsHandler) RowsHandler
- func (r *Map) SetIgnoreUndefineds(ignoreUndefineds bool) *Map
- func (r *Map) Types() RecordMap
- func (r *Map) WithTypes(types RecordMap) *Map
- type RawRowScann
- type RecordMap
- func (m RecordMap) Get(key string) (val any, ok bool)
- func (m RecordMap) GetDefault(key string, defaul any) (val any, ok bool)
- func (m RecordMap) Map(cb func(key string, val any) any)
- func (m RecordMap) Set(key string, val any)
- func (m RecordMap) SetIfExists(key string, val any)
- func (m RecordMap) Walk(cb func(key string, val any))
- func (m RecordMap) WalkSep(sep string, cb func(key string, val any))
- type RowFactory
- type RowFactoryFunc
- type RowInitializer
- type RowInitializerFunc
- type RowScanContext
- type RowScanner
- type RowsHandler
- type RowsHandlerFunc
- type Scanner
- type ScannerFunc
- type Slice
Constants ¶
This section is empty.
Variables ¶
View Source
var Break = errors.New("break")
View Source
var RawRowsHandler = RowsHandlerFunc(func([]string) RowInitializer { return RowInitializerFunc(func(_ []string, dst []any) (record func(dst []any) (_ any, err error), err error) { RawRowScanner(dst) return func(dst []any) (_ any, err error) { return dst, nil }, nil }) })
Functions ¶
func DiscardValuer ¶
func RawRowScanner ¶
func RawRowScanner(dst []any)
func SqlRowsLoop ¶
Types ¶
type Iterator ¶
type Iterator interface {
Next() error
}
func LimitedIterator ¶
func SqlRowsIterator ¶
type IteratorFunc ¶
type IteratorFunc func() error
func (IteratorFunc) Next ¶
func (f IteratorFunc) Next() error
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func NewRecordMapHandler ¶
func NewRecordMapHandler(next RowsHandler) *Map
func (*Map) Factory ¶
func (s *Map) Factory(columns []string) RowInitializer
func (*Map) IgnoreUndefineds ¶
func (*Map) IsIgnoreUndefineds ¶
func (*Map) NewInitializer ¶
func (r *Map) NewInitializer(columns []string) RowInitializer
func (*Map) Pipe ¶
func (r *Map) Pipe(to func(next RowsHandler) RowsHandler) RowsHandler
func (*Map) SetIgnoreUndefineds ¶
type RawRowScann ¶
type RawRowScann struct {
}
type RowFactory ¶
type RowFactory interface {
Factory(columns []string) RowInitializer
}
type RowFactoryFunc ¶
type RowFactoryFunc func(columns []string) RowInitializer
func (RowFactoryFunc) Factory ¶
func (f RowFactoryFunc) Factory(columns []string) RowInitializer
type RowInitializer ¶
type RowInitializer interface {
InitRow(columns []string, dst []any) (record func(dst []any) (_ any, err error), err error)
Pipe(to func(next RowInitializer) RowInitializer) RowInitializer
}
type RowInitializerFunc ¶
type RowInitializerFunc func(columns []string, dst []any) (record func(dst []any) (_ any, err error), err error)
func (RowInitializerFunc) Pipe ¶
func (f RowInitializerFunc) Pipe(to func(next RowInitializer) RowInitializer) RowInitializer
type RowScanContext ¶
type RowScanner ¶
type RowScanner struct {
// contains filtered or unexported fields
}
type RowsHandler ¶
type RowsHandler interface {
NewInitializer(columns []string) RowInitializer
Pipe(to func(next RowsHandler) RowsHandler) RowsHandler
}
type RowsHandlerFunc ¶
type RowsHandlerFunc func(columns []string) RowInitializer
func (RowsHandlerFunc) NewInitializer ¶
func (f RowsHandlerFunc) NewInitializer(columns []string) RowInitializer
func (RowsHandlerFunc) Pipe ¶
func (f RowsHandlerFunc) Pipe(to func(next RowsHandler) RowsHandler) RowsHandler
type ScannerFunc ¶
func (ScannerFunc) Scan ¶
func (f ScannerFunc) Scan(values ...any) error
type Slice ¶
type Slice struct {
Next RowsHandler
Start, Length int
}
func (*Slice) Factory ¶
func (s *Slice) Factory(columns []string) RowInitializer
func (*Slice) NewInitializer ¶
func (s *Slice) NewInitializer(columns []string) RowInitializer
func (*Slice) Pipe ¶
func (s *Slice) Pipe(to func(next RowsHandler) RowsHandler) RowsHandler
Click to show internal directories.
Click to hide internal directories.