Library that simplify working with rows in clickhouse-go.
go get github.com/EpicStep/clickhouse-go-rows-utils
Documentation for all functions available at pkg.go.dev
package main
import (
"context"
rowsutils "github.com/EpicStep/clickhouse-go-rows-utils"
)
func main() {
// connect to database.
rows, err := db.Query(context.Background(), "SELECT 1")
if err != nil {
panic(err)
}
err = rowsutils.ForEachRow(rows, func(row rowsutils.CollectableRow) error {
// scan your rows or do other work.
return nil
})
if err != nil {
panic(err)
}
}