mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-20 04:33:38 +08:00
remove join
This commit is contained in:
parent
899f5adf5e
commit
40c3343016
|
@ -605,12 +605,11 @@ func (issues IssueList) BlockingDependenciesMap(ctx context.Context) (issueDepsM
|
||||||
|
|
||||||
err = db.GetEngine(ctx).
|
err = db.GetEngine(ctx).
|
||||||
Table("issue").
|
Table("issue").
|
||||||
Join("INNER", "repository", "repository.id = issue.repo_id").
|
|
||||||
Join("INNER", "issue_dependency", "issue_dependency.issue_id = issue.id").
|
Join("INNER", "issue_dependency", "issue_dependency.issue_id = issue.id").
|
||||||
Where(builder.In("issue_dependency.dependency_id", issues.getIssueIDs())).
|
Where(builder.In("issue_dependency.dependency_id", issues.getIssueIDs())).
|
||||||
// sort by repo id then created date
|
// sort by repo id then index
|
||||||
Asc("issue.repo_id").
|
Asc("`issue`.`repo_id`").
|
||||||
Asc("issue.created_unix").
|
Asc("`issue`.`index`").
|
||||||
Find(&issueDeps)
|
Find(&issueDeps)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -631,12 +630,11 @@ func (issues IssueList) BlockedByDependenciesMap(ctx context.Context) (issueDeps
|
||||||
|
|
||||||
err = db.GetEngine(ctx).
|
err = db.GetEngine(ctx).
|
||||||
Table("issue").
|
Table("issue").
|
||||||
Join("INNER", "repository", "repository.id = issue.repo_id").
|
|
||||||
Join("INNER", "issue_dependency", "issue_dependency.dependency_id = issue.id").
|
Join("INNER", "issue_dependency", "issue_dependency.dependency_id = issue.id").
|
||||||
Where(builder.In("issue_dependency.issue_id", issues.getIssueIDs())).
|
Where(builder.In("issue_dependency.issue_id", issues.getIssueIDs())).
|
||||||
// sort by repo id then created date
|
// sort by repo id then index
|
||||||
Asc("issue.repo_id").
|
Asc("`issue`.`repo_id`").
|
||||||
Asc("issue.created_unix").
|
Asc("`issue`.`index`").
|
||||||
Find(&issueDeps)
|
Find(&issueDeps)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue
Block a user