Documentation
¶
Index ¶
- func AssertRowsAffected(operation string, expectedRows int) func(sql.Result, error) error
- func CollectRows[T any](rows Rows, queryErr error) (result []T, err error)
- func IterateRows[T any](rows Rows, err error) iter.Seq2[T, error]
- func ScanRow[T any](row RowScanner, err error) (T, error)
- type RowScanner
- type Rows
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertRowsAffected ¶
AssertRowsAffected checks if the given result affected exactly the expected number of rows.
func CollectRows ¶
CollectRows collects all rows to the given target type from a ExecutiveQueryBuilder.Query result.
func IterateRows ¶ added in v2.2.0
IterateRows returns an iterator over the rows of a database query and scans them to T. If an error occurred initially, while scanning or closing, it returns a single-use iterator with the error. It returns a single-use iterator.
Types ¶
type RowScanner ¶
Click to show internal directories.
Click to hide internal directories.