clickhouse-go-rows-utils [](https://pkg.go.dev/github.com/EpicStep/clickhouse-go-rows-utils) [](https://github.com/EpicStep/clickhouse-go-rows-utils/actions/workflows/lint.yml) [](https://github.com/EpicStep/clickhouse-go-rows-utils/actions/workflows/test.yml)

September 27, 2024 ยท View on GitHub

Library that simplify working with rows in clickhouse-go.

Install

go get github.com/EpicStep/clickhouse-go-rows-utils

Documentation

Documentation for all functions available at pkg.go.dev

Usage example

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)
	}
}