-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(migrations): move migrations into a single package
- Loading branch information
1 parent
ae5ba2b
commit 4c94386
Showing
40 changed files
with
1,151 additions
and
572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
package dao | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/jmoiron/sqlx" | ||
"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) | ||
} | ||
func InitDao(inputDB *sqlx.DB) (ModelDao, error) { | ||
return sqlite.InitDB(inputDB) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.