MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / hasLinkDB

Function hasLinkDB

agent/app/service/app_utils.go:2286–2300  ·  view source on GitHub ↗
(installID uint)

Source from the content-addressed store, hash-verified

2284}
2285
2286func hasLinkDB(installID uint) bool {
2287 resources, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithAppInstallId(installID))
2288 hasDB := false
2289 if len(resources) > 0 {
2290 for _, resource := range resources {
2291 if resource.Key == constant.AppPostgres || resource.Key == constant.AppMysql ||
2292 resource.Key == constant.AppMariaDB || resource.Key == constant.AppMysqlCluster ||
2293 resource.Key == constant.AppPostgresql || resource.Key == constant.AppPostgresqlCluster {
2294 hasDB = true
2295 break
2296 }
2297 }
2298 }
2299 return hasDB
2300}
2301
2302func isEditCompose(installed model.AppInstall) bool {
2303 detail, _ := appDetailRepo.GetFirst(repo.WithByID(installed.AppDetailId))

Callers 1

handleInstalledFunction · 0.85

Calls 2

GetByMethod · 0.65
WithAppInstallIdMethod · 0.65

Tested by

no test coverage detected