sql

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadRows

func ReadRows[T any](rows *sql.Rows) ([]*T, error)

ReadRows extracts all the data from a single SQL result set into a slice of the specified type. This function attempts to map each column in the result set to an associated field on the item, based on the value of an "sql" tag, a "json" tag or the field name in that order. The mapping is case-insensitive. If any column can't be mapped then an error will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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