12345678910111213141516171819202122232425 |
- package olap
- import (
- "github.com/ClickHouse/clickhouse-go/v2/lib/driver"
- "gorm.io/gorm"
- )
- var defaultOlapConn driver.Conn
- var gormClickhouse *gorm.DB
- // GetOlapManager return OLAP manager
- func GetOlapManager() driver.Conn {
- if defaultOlapConn == nil {
- Setup()
- }
- return defaultOlapConn
- }
- func GetClickhouseOrm() *gorm.DB {
- if gormClickhouse == nil {
- setClickhouseOrm()
- }
- return gormClickhouse
- }
|