scanner

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RecordNotFound = errors.New("record is not found")

Functions

func Scan

func Scan(ctx context.Context, rows *sql.Rows, v interface{}) error

Types

type RowScanner

type RowScanner interface {
	Scan(values ...interface{}) error
}

type ScanIterator

type ScanIterator interface {
	// New a ptr value for scan
	New() interface{}
	// Next For receive scanned value
	Next(v interface{}) error
}

func ScanIteratorFor

func ScanIteratorFor(v interface{}) (ScanIterator, error)

type SingleScanIterator

type SingleScanIterator struct {
	// contains filtered or unexported fields
}

func (*SingleScanIterator) MustHasRecord

func (s *SingleScanIterator) MustHasRecord() bool

func (*SingleScanIterator) New

func (s *SingleScanIterator) New() interface{}

func (*SingleScanIterator) Next

func (s *SingleScanIterator) Next(v interface{}) error

type SliceScanIterator

type SliceScanIterator struct {
	// contains filtered or unexported fields
}

func (*SliceScanIterator) New

func (s *SliceScanIterator) New() interface{}

func (*SliceScanIterator) Next

func (s *SliceScanIterator) Next(v interface{}) error

type WithColumnReceivers

type WithColumnReceivers interface {
	ColumnReceivers() map[string]interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL