Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 262637f

Browse files
committed
README: check error
1 parent 3c88e39 commit 262637f

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ClickHouse [![Build Status](https://travis-ci.org/kshvakov/clickhouse.svg?branch=master)](https://travis-ci.org/kshvakov/clickhouse) [![Go Report Card](https://goreportcard.com/badge/github.com/kshvakov/clickhouse)](https://goreportcard.com/report/github.com/kshvakov/clickhouse) [![codecov](https://codecov.io/gh/kshvakov/clickhouse/branch/master/graph/badge.svg)](https://codecov.io/gh/kshvakov/clickhouse)
22

3-
Golang SQL database driver for [Yandex ClickHouse](https://clickhouse.yandex/)
3+
Golang SQL database driver for [Yandex ClickHouse](https://clickhouse.yandex/)
44

55
## Key features
66

@@ -10,15 +10,15 @@ Golang SQL database driver for [Yandex ClickHouse](https://clickhouse.yandex/)
1010
* Bulk write support : `begin->prepare->(in loop exec)->commit`
1111
* LZ4 compression support (default to use pure go lz4, switch to use cgo lz4 by turn clz4 build tags on)
1212

13-
## DSN
13+
## DSN
1414

1515
* username/password - auth credentials
1616
* database - select the current default database
17-
* read_timeout/write_timeout - timeout in second
17+
* read_timeout/write_timeout - timeout in second
1818
* no_delay - disable/enable the Nagle Algorithm for tcp socket (default is 'true' - disable)
1919
* alt_hosts - comma separated list of single address host for load-balancing
20-
* connection_open_strategy - random/in_order (default random).
21-
* random - choose random server from set
20+
* connection_open_strategy - random/in_order (default random).
21+
* random - choose random server from set
2222
* in_order - first live server is choosen in specified order
2323
* block_size - maximum rows in block (default is 1000000). If the rows are larger then the data will be split into several blocks to send them to the server
2424
* pool size - maximum amount of preallocated byte chunks used in queries (default is 100). Decrease this if you experience memory problems at the expense of more GC pressure and vice versa.
@@ -41,7 +41,7 @@ tcp://host1:9000?username=user&password=qwerty&database=clicks&read_timeout=10&w
4141
* Float32, Float64
4242
* String
4343
* FixedString(N)
44-
* Date
44+
* Date
4545
* DateTime
4646
* IPv4
4747
* IPv6
@@ -60,7 +60,7 @@ go get -u github.com/kshvakov/clickhouse
6060
```
6161

6262
## Example
63-
```go
63+
```go
6464
package main
6565

6666
import (
@@ -142,6 +142,10 @@ func main() {
142142
log.Printf("country: %s, os: %d, browser: %d, categories: %v, action_day: %s, action_time: %s", country, os, browser, categories, actionDay, actionTime)
143143
}
144144

145+
if err := rows.Err(); err != nil {
146+
log.Fatal(err)
147+
}
148+
145149
if _, err := connect.Exec("DROP TABLE example"); err != nil {
146150
log.Fatal(err)
147151
}

0 commit comments

Comments
 (0)