clickhouse.go 361 B

1234567891011121314
  1. package clickhouse
  2. import (
  3. // imports the driver.
  4. "git.i2edu.net/i2/go-zero/core/stores/sqlx"
  5. _ "github.com/ClickHouse/clickhouse-go"
  6. )
  7. const clickHouseDriverName = "clickhouse"
  8. // New returns a clickhouse connection.
  9. func New(datasource string, opts ...sqlx.SqlOption) sqlx.SqlConn {
  10. return sqlx.NewSqlConn(clickHouseDriverName, datasource, opts...)
  11. }