Skip to content

Commit

Permalink
refactored sql query
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishdevtron committed Aug 14, 2023
1 parent d573842 commit 2bcf453
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/chartRepo/repository/ChartRepoRepository.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ func (impl ChartRepoRepositoryImpl) FindDeploymentCountByChartRepoId(chartId int
" inner join installed_apps ia on iav.installed_app_id = ia.id" +
" inner join app_store_application_version asav on iav.app_store_application_version_id = asav.id" +
" inner join app_store aps on asav.app_store_id = aps.id" +
" where ia.active=true and iav.active=true and aps.chart_repo_id = " + strconv.Itoa(chartId) +
" ;"
_, err := impl.dbConnection.Query(&activeDeploymentCount, query)
" where ia.active=(?) and iav.active=(?) and aps.chart_repo_id = (?);"
_, err := impl.dbConnection.Query(&activeDeploymentCount, query, true, true, strconv.Itoa(chartId))
return activeDeploymentCount, err
}

Expand Down

0 comments on commit 2bcf453

Please sign in to comment.