mockrows

package
v0.0.0-...-a532a67 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List []Row

List represent plain data for mock interface

type Row

type Row map[string]interface{}

Row represent a single object data

type Rows

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

Rows represent a mocked database response

func NewRows

func NewRows(data List) *Rows

NewRows create new mocked rows

func (*Rows) Close

func (r *Rows) Close() error

Close close mock database connection

func (*Rows) Next

func (r *Rows) Next() bool

Next check if next element exist

func (*Rows) StructScan

func (r *Rows) StructScan(dest interface{}) error

StructScan scan current row

Jump to

Keyboard shortcuts

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