diff --git a/examples/std/compression.go b/examples/std/compression.go index bc0f424b7a..6448cff743 100644 --- a/examples/std/compression.go +++ b/examples/std/compression.go @@ -20,8 +20,9 @@ package std import ( "database/sql" "fmt" - "github.com/ClickHouse/clickhouse-go/v2" "strconv" + + "github.com/ClickHouse/clickhouse-go/v2" ) func CompressOpenDB() error { @@ -49,6 +50,7 @@ func CompressOpenDB() error { if _, err := conn.Exec(` CREATE TABLE example ( Col1 Array(String) + , Col2 UInt64 ) Engine Memory `); err != nil { return err @@ -62,7 +64,10 @@ func CompressOpenDB() error { return err } for i := 0; i < 1000; i++ { - if _, err := batch.Exec([]string{strconv.Itoa(i), strconv.Itoa(i + 1), strconv.Itoa(i + 2), strconv.Itoa(i + 3)}); err != nil { + if _, err := batch.Exec( + []string{strconv.Itoa(i), strconv.Itoa(i + 1), strconv.Itoa(i + 2), strconv.Itoa(i + 3)}, + uint64(i), + ); err != nil { return err } } @@ -86,6 +91,7 @@ func CompressOpen() error { if _, err := conn.Exec(` CREATE TABLE example ( Col1 Array(String) + , Col2 UInt64 ) Engine Memory `); err != nil { return err @@ -99,7 +105,10 @@ func CompressOpen() error { return err } for i := 0; i < 1000; i++ { - if _, err := batch.Exec([]string{strconv.Itoa(i), strconv.Itoa(i + 1), strconv.Itoa(i + 2), strconv.Itoa(i + 3)}); err != nil { + if _, err := batch.Exec( + []string{strconv.Itoa(i), strconv.Itoa(i + 1), strconv.Itoa(i + 2), strconv.Itoa(i + 3)}, + uint64(i), + ); err != nil { return err } }