定义一个配置记录是不是timescaledb

This commit is contained in:
2025-09-24 16:06:05 +08:00
parent 6520f2e9d7
commit b668f3fbb5
7 changed files with 46 additions and 1 deletions

View File

@@ -42,9 +42,11 @@ func NewStorage(cfg config.DatabaseConfig, logger *logs.Logger) Storage {
cfg.SSLMode,
)
// 当前默认返回PostgreSQL存储实现并将 logger 注入
// 当前默认返回PostgreSQL存储实现并将 logger 注入
return NewPostgresStorage(
connectionString,
cfg.IsTimescaleDB, // <--- 添加 IsTimescaleDB
cfg.MaxOpenConns,
cfg.MaxIdleConns,
cfg.ConnMaxLifetime,