databaseiter

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

databaseiter defines iterator source/collector that corresponds to std library `database/*`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SqlRows

func SqlRows[T any](r *sql.Rows, scanner func(*sql.Rows) (T, error)) iter.Seq2[T, error]

SqlRows returns an iterator over scanned rows from r. scanner will be called against *sql.Rows after each time *sql.Rows.Next returns true. It must either call *sql.Rows.Scan once per invocation or do nothing and return. If the scan result or *sql.Rows.Err returns a non-nil error, the iterator stops its iteration immediately after yielding the error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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