Signed-off-by: Lewis lewis@tangled.org
appview/db/artifact.go
appview/db/artifact.go
This file has not been changed.
appview/db/collaborators.go
appview/db/collaborators.go
This file has not been changed.
appview/db/issues.go
appview/db/issues.go
This file has not been changed.
appview/db/language.go
appview/db/language.go
This file has not been changed.
appview/db/pipeline.go
appview/db/pipeline.go
This file has not been changed.
appview/db/profile.go
appview/db/profile.go
This file has not been changed.
appview/db/pulls.go
appview/db/pulls.go
This file has not been changed.
appview/db/reference.go
appview/db/reference.go
This file has not been changed.
appview/db/repos.go
appview/db/repos.go
This file has not been changed.
+2
-12
appview/db/star.go
+2
-12
appview/db/star.go
···
72
72
return err
73
73
}
74
74
75
-
func GetStarCount(e Execer, subjectAt syntax.ATURI) (int, error) {
76
-
stars := 0
77
-
err := e.QueryRow(
78
-
`select count(did) from stars where subject_at = ?`, subjectAt).Scan(&stars)
79
-
if err != nil {
80
-
return 0, err
81
-
}
82
-
return stars, nil
83
-
}
84
-
85
-
func GetStarCountByRepoDid(e Execer, repoDid string, repoAt syntax.ATURI) (int, error) {
75
+
func GetStarCount(e Execer, repoDid string, subjectAt syntax.ATURI) (int, error) {
86
76
stars := 0
87
77
err := e.QueryRow(
88
78
`select count(did) from stars where subject_did = ? or subject_at = ?`,
89
-
repoDid, repoAt.String()).Scan(&stars)
79
+
repoDid, subjectAt.String()).Scan(&stars)
90
80
if err != nil {
91
81
return 0, err
92
82
}
appview/db/webhooks.go
appview/db/webhooks.go
This file has not been changed.
+1
-1
appview/strings/strings.go
+1
-1
appview/strings/strings.go
History
9 rounds
0 comments
oyster.cafe
submitted
#8
1 commit
expand
collapse
appview/db: update query functions for repo_did across all tables
Signed-off-by: Lewis <lewis@tangled.org>
expand 0 comments
This pull has been deleted (possibly by jj abandon or jj squash)
oyster.cafe
submitted
#7
1 commit
expand
collapse
appview/db: update query functions for repo_did across all tables
Signed-off-by: Lewis <lewis@tangled.org>
expand 0 comments
oyster.cafe
submitted
#6
1 commit
expand
collapse
appview/db: update query functions for repo_did across all tables
Signed-off-by: Lewis <lewis@tangled.org>
expand 0 comments
oyster.cafe
submitted
#5
1 commit
expand
collapse
appview/db: update query functions for repo_did across all tables
Signed-off-by: Lewis <lewis@tangled.org>
expand 0 comments
oyster.cafe
submitted
#4
1 commit
expand
collapse
appview/db: update query functions for repo_did across all tables
Signed-off-by: Lewis <lewis@tangled.org>
expand 0 comments
oyster.cafe
submitted
#3
1 commit
expand
collapse
appview/db: update query functions for repo_did across all tables
Signed-off-by: Lewis <lewis@tangled.org>
expand 0 comments
oyster.cafe
submitted
#2
1 commit
expand
collapse
appview/db: update query functions for repo_did across all tables
Signed-off-by: Lewis <lewis@tangled.org>
expand 0 comments
oyster.cafe
submitted
#1
1 commit
expand
collapse
appview/db: update query functions for repo_did across all tables
Signed-off-by: Lewis <lewis@tangled.org>
expand 0 comments
oyster.cafe
submitted
#0
1 commit
expand
collapse
appview/db: update query functions for repo_did across all tables
Signed-off-by: Lewis <lewis@tangled.org>