Permalink
Browse files

Add ClickHouse support (#11)

* Add ClickHouse support

* Vendor github.com/kshvakov/clickhouse
  • Loading branch information...
bobrik authored and dominikschulz committed Jul 9, 2017
1 parent 411ce99 commit 66dee62f4e8b709d4d588758fb0b14ba6500c389
Showing with 2,847 additions and 1 deletion.
  1. +4 −1 job.go
  2. +21 −0 vendor/github.com/kshvakov/clickhouse/LICENSE
  3. +6 −0 vendor/github.com/kshvakov/clickhouse/Makefile
  4. +167 −0 vendor/github.com/kshvakov/clickhouse/README.md
  5. +234 −0 vendor/github.com/kshvakov/clickhouse/array.go
  6. +305 −0 vendor/github.com/kshvakov/clickhouse/block.go
  7. +172 −0 vendor/github.com/kshvakov/clickhouse/bootstrap.go
  8. +238 −0 vendor/github.com/kshvakov/clickhouse/clickhouse.go
  9. +46 −0 vendor/github.com/kshvakov/clickhouse/clickhouse_exception.go
  10. +39 −0 vendor/github.com/kshvakov/clickhouse/clickhouse_go18.go
  11. +13 −0 vendor/github.com/kshvakov/clickhouse/clickhouse_ping.go
  12. +36 −0 vendor/github.com/kshvakov/clickhouse/clickhouse_profile_info.go
  13. +26 −0 vendor/github.com/kshvakov/clickhouse/clickhouse_progress.go
  14. +65 −0 vendor/github.com/kshvakov/clickhouse/clickhouse_receive_data.go
  15. +40 −0 vendor/github.com/kshvakov/clickhouse/clickhouse_send_query.go
  16. +78 −0 vendor/github.com/kshvakov/clickhouse/connect.go
  17. +102 −0 vendor/github.com/kshvakov/clickhouse/enum.go
  18. +200 −0 vendor/github.com/kshvakov/clickhouse/helpers.go
  19. +201 −0 vendor/github.com/kshvakov/clickhouse/read.go
  20. +8 −0 vendor/github.com/kshvakov/clickhouse/result.go
  21. +46 −0 vendor/github.com/kshvakov/clickhouse/rows.go
  22. +146 −0 vendor/github.com/kshvakov/clickhouse/stmt.go
  23. +76 −0 vendor/github.com/kshvakov/clickhouse/uuid.go
  24. +70 −0 vendor/github.com/kshvakov/clickhouse/value_converter.go
  25. +233 −0 vendor/github.com/kshvakov/clickhouse/write.go
  26. +123 −0 vendor/github.com/kshvakov/clickhouse/write_buffer.go
  27. +146 −0 vendor/github.com/kshvakov/clickhouse/write_column.go
  28. +6 −0 vendor/vendor.json
5 job.go
@@ -13,7 +13,8 @@ import (
"github.com/go-kit/kit/log/level"
_ "github.com/go-sql-driver/mysql" // register the MySQL driver
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq" // register the PostgreSQL driver
_ "github.com/kshvakov/clickhouse" // register the ClickHouse driver
_ "github.com/lib/pq" // register the PostgreSQL driver
"github.com/prometheus/client_golang/prometheus"
)
@@ -181,6 +182,8 @@ func (c *connection) connect(iv time.Duration) error {
switch c.url.Scheme {
case "mysql":
dsn = strings.TrimPrefix(dsn, "mysql://")
case "clickhouse":
dsn = "tcp://" + strings.TrimPrefix(dsn, "clickhouse://")
}
conn, err := sqlx.Connect(c.url.Scheme, dsn)
if err != nil {

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 66dee62

Please sign in to comment.