Documentation
¶
Overview ¶
Package clickhouse_go_rows_utils implement utils for working with rows at clickhouse-go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendRows ¶
AppendRows iterates through rows, calling fn for each row, and appending the results into a slice of T.
func CollectRows ¶
CollectRows iterates through rows, calling fn for each row, and collecting the results into a slice of T.
func ForEachRow ¶
func ForEachRow(rows driver.Rows, fn ForEachRowFunc) error
ForEachRow iterates through rows, calling fn for each row.
Types ¶
type CollectableRow ¶
type CollectableRow interface { Scan(dest ...any) error ScanStruct(dest any) error ColumnTypes() []driver.ColumnType Totals(dest ...any) error Columns() []string }
CollectableRow is the subset of Rows methods that a RowToFunc is allowed to call.
type ForEachRowFunc ¶
type ForEachRowFunc func(row CollectableRow) error
ForEachRowFunc calls at each row.
type RowToFunc ¶
type RowToFunc[T any] func(row CollectableRow) (T, error)
RowToFunc is a function that scans or otherwise converts row to a T.
Click to show internal directories.
Click to hide internal directories.