scanner

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Scan

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

func ScanRows

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

Types

type EmptyScanner

type EmptyScanner int

func (*EmptyScanner) Scan

func (s *EmptyScanner) Scan(_ interface{}) error

type RowScanner

type RowScanner interface {
	Scan(...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) HasRecord

func (s *SingleScanIterator) HasRecord() 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