Backend: Remove unused code (#28933)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-11-11 11:38:04 +01:00
committed by GitHub
parent 7378af0a77
commit ab078133bf
3 changed files with 0 additions and 18 deletions
-8
View File
@@ -18,7 +18,6 @@ import (
func init() {
bus.AddHandler("sql", GetDataSources)
bus.AddHandler("sql", GetAllDataSources)
bus.AddHandler("sql", AddDataSource)
bus.AddHandler("sql", DeleteDataSourceById)
bus.AddHandler("sql", DeleteDataSourceByName)
@@ -74,13 +73,6 @@ func GetDataSources(query *models.GetDataSourcesQuery) error {
return sess.Find(&query.Result)
}
func GetAllDataSources(query *models.GetAllDataSourcesQuery) error {
sess := x.Limit(5000, 0).Asc("name")
query.Result = make([]*models.DataSource, 0)
return sess.Find(&query.Result)
}
func DeleteDataSourceById(cmd *models.DeleteDataSourceByIdCommand) error {
return inTransaction(func(sess *DBSession) error {
var rawSQL = "DELETE FROM data_source WHERE id=? and org_id=?"