19 lines
301 B
Go
19 lines
301 B
Go
|
package dao
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"go.signoz.io/signoz/ee/query-service/dao/sqlite"
|
||
|
)
|
||
|
|
||
|
func InitDao(engine, path string) (ModelDao, error) {
|
||
|
|
||
|
switch engine {
|
||
|
case "sqlite":
|
||
|
return sqlite.InitDB(path)
|
||
|
default:
|
||
|
return nil, fmt.Errorf("qsdb type: %s is not supported in query service", engine)
|
||
|
}
|
||
|
|
||
|
}
|