perf: refactor

This commit is contained in:
ryan
2026-06-20 09:48:33 +08:00
parent cac6e88bc0
commit 200525a1ab
6 changed files with 149 additions and 179 deletions
+5 -1
View File
@@ -41,6 +41,10 @@ func init() {
}
cfg := config.Config.ClickHouse
if cfg.Database == "" {
log.Fatalf("[ClickHouse] database name is required (expected: wavelet)\n")
}
opts := buildClickHouseOptions()
var err error
@@ -148,4 +152,4 @@ func SetChDBForTest(d *gorm.DB) {
// SetChConnForTest sets the package-level native ClickHouse connection for testing.
func SetChConnForTest(c driver.Conn) {
ChConn = c
}
}