Skip to content

EpicStep/clickhouse-go-rows-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clickhouse-go-rows-utils Go Reference Lint Test

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

About

Library that simplify working with rows in clickhouse-go

Resources

Stars

Watchers

Forks