back interdiff of round #3 and #2

appview: implement pagination for pipelines index #521

closed
opened by ptr.pet targeting master from [deleted fork]: pipeline-paginated
ERROR
appview/db/artifact.go

Failed to calculate interdiff for this file.

ERROR
appview/db/collaborators.go

Failed to calculate interdiff for this file.

ERROR
appview/db/db.go

Failed to calculate interdiff for this file.

ERROR
appview/db/follow.go

Failed to calculate interdiff for this file.

REBASED
appview/db/issues.go

This patch was likely rebased, as context lines do not match.

ERROR
appview/db/language.go

Failed to calculate interdiff for this file.

ERROR
appview/db/pipeline.go

Failed to calculate interdiff for this file.

ERROR
appview/db/profile.go

Failed to calculate interdiff for this file.

ERROR
appview/db/pulls.go

Failed to calculate interdiff for this file.

ERROR
appview/db/punchcard.go

Failed to calculate interdiff for this file.

ERROR
appview/db/registration.go

Failed to calculate interdiff for this file.

REBASED
appview/db/repos.go

This patch was likely rebased, as context lines do not match.

REBASED
appview/db/spindle.go

This patch was likely rebased, as context lines do not match.

ERROR
appview/db/star.go

Failed to calculate interdiff for this file.

REBASED
appview/db/strings.go

This patch was likely rebased, as context lines do not match.

ERROR
appview/pages/pages.go

Failed to calculate interdiff for this file.

ERROR
appview/pages/templates/repo/pipelines/pipelines.html

Failed to calculate interdiff for this file.

REBASED
appview/pipelines/pipelines.go

This patch was likely rebased, as context lines do not match.

ERROR
appview/pipelines/router.go

Failed to calculate interdiff for this file.

NEW
appview/db/label.go
··· 59 return id, nil 60 } 61 62 - func DeleteLabelDefinition(e Execer, filters ...filter) error { 63 var conditions []string 64 var args []any 65 for _, filter := range filters { ··· 75 return err 76 } 77 78 - func GetLabelDefinitions(e Execer, filters ...filter) ([]models.LabelDefinition, error) { 79 var labelDefinitions []models.LabelDefinition 80 var conditions []string 81 var args []any ··· 92 93 query := fmt.Sprintf( 94 ` 95 - select 96 id, 97 did, 98 rkey, ··· 167 } 168 169 // helper to get exactly one label def 170 - func GetLabelDefinition(e Execer, filters ...filter) (*models.LabelDefinition, error) { 171 labels, err := GetLabelDefinitions(e, filters...) 172 if err != nil { 173 return nil, err ··· 227 return id, nil 228 } 229 230 - func GetLabelOps(e Execer, filters ...filter) ([]models.LabelOp, error) { 231 var labelOps []models.LabelOp 232 var conditions []string 233 var args []any ··· 302 } 303 304 // get labels for a given list of subject URIs 305 - func GetLabels(e Execer, filters ...filter) (map[syntax.ATURI]models.LabelState, error) { 306 ops, err := GetLabelOps(e, filters...) 307 if err != nil { 308 return nil, err ··· 338 return results, nil 339 } 340 341 - func NewLabelApplicationCtx(e Execer, filters ...filter) (*models.LabelApplicationCtx, error) { 342 labels, err := GetLabelDefinitions(e, filters...) 343 if err != nil { 344 return nil, err
··· 59 return id, nil 60 } 61 62 + func DeleteLabelDefinition(e Execer, filters ...Filter) error { 63 var conditions []string 64 var args []any 65 for _, filter := range filters { ··· 75 return err 76 } 77 78 + func GetLabelDefinitions(e Execer, filters ...Filter) ([]models.LabelDefinition, error) { 79 var labelDefinitions []models.LabelDefinition 80 var conditions []string 81 var args []any ··· 92 93 query := fmt.Sprintf( 94 ` 95 + select 96 id, 97 did, 98 rkey, ··· 167 } 168 169 // helper to get exactly one label def 170 + func GetLabelDefinition(e Execer, filters ...Filter) (*models.LabelDefinition, error) { 171 labels, err := GetLabelDefinitions(e, filters...) 172 if err != nil { 173 return nil, err ··· 227 return id, nil 228 } 229 230 + func GetLabelOps(e Execer, filters ...Filter) ([]models.LabelOp, error) { 231 var labelOps []models.LabelOp 232 var conditions []string 233 var args []any ··· 302 } 303 304 // get labels for a given list of subject URIs 305 + func GetLabels(e Execer, filters ...Filter) (map[syntax.ATURI]models.LabelState, error) { 306 ops, err := GetLabelOps(e, filters...) 307 if err != nil { 308 return nil, err ··· 338 return results, nil 339 } 340 341 + func NewLabelApplicationCtx(e Execer, filters ...Filter) (*models.LabelApplicationCtx, error) { 342 labels, err := GetLabelDefinitions(e, filters...) 343 if err != nil { 344 return nil, err
NEW
appview/db/notifications.go
··· 43 } 44 45 // GetNotificationsPaginated retrieves notifications with filters and pagination 46 - func GetNotificationsPaginated(e Execer, page pagination.Page, filters ...filter) ([]*models.Notification, error) { 47 var conditions []string 48 var args []any 49 ··· 109 } 110 111 // GetNotificationsWithEntities retrieves notifications with their related entities 112 - func GetNotificationsWithEntities(e Execer, page pagination.Page, filters ...filter) ([]*models.NotificationWithEntity, error) { 113 var conditions []string 114 var args []any 115 ··· 246 } 247 248 // GetNotifications retrieves notifications with filters 249 - func GetNotifications(e Execer, filters ...filter) ([]*models.Notification, error) { 250 return GetNotificationsPaginated(e, pagination.Page{No: 0, Count: 30}, filters...) 251 } 252 253 - func CountNotifications(e Execer, filters ...filter) (int64, error) { 254 var conditions []string 255 var args []any 256 for _, filter := range filters {
··· 43 } 44 45 // GetNotificationsPaginated retrieves notifications with filters and pagination 46 + func GetNotificationsPaginated(e Execer, page pagination.Page, filters ...Filter) ([]*models.Notification, error) { 47 var conditions []string 48 var args []any 49 ··· 109 } 110 111 // GetNotificationsWithEntities retrieves notifications with their related entities 112 + func GetNotificationsWithEntities(e Execer, page pagination.Page, filters ...Filter) ([]*models.NotificationWithEntity, error) { 113 var conditions []string 114 var args []any 115 ··· 246 } 247 248 // GetNotifications retrieves notifications with filters 249 + func GetNotifications(e Execer, filters ...Filter) ([]*models.Notification, error) { 250 return GetNotificationsPaginated(e, pagination.Page{No: 0, Count: 30}, filters...) 251 } 252 253 + func CountNotifications(e Execer, filters ...Filter) (int64, error) { 254 var conditions []string 255 var args []any 256 for _, filter := range filters {
NEW
appview/db/timeline.go
··· 84 } 85 86 func getTimelineRepos(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) { 87 - filters := make([]filter, 0) 88 if userIsFollowing != nil { 89 filters = append(filters, FilterIn("did", userIsFollowing)) 90 } ··· 144 } 145 146 func getTimelineStars(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) { 147 - filters := make([]filter, 0) 148 if userIsFollowing != nil { 149 filters = append(filters, FilterIn("starred_by_did", userIsFollowing)) 150 } ··· 190 } 191 192 func getTimelineFollows(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) { 193 - filters := make([]filter, 0) 194 if userIsFollowing != nil { 195 filters = append(filters, FilterIn("user_did", userIsFollowing)) 196 }
··· 84 } 85 86 func getTimelineRepos(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) { 87 + filters := make([]Filter, 0) 88 if userIsFollowing != nil { 89 filters = append(filters, FilterIn("did", userIsFollowing)) 90 } ··· 144 } 145 146 func getTimelineStars(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) { 147 + filters := make([]Filter, 0) 148 if userIsFollowing != nil { 149 filters = append(filters, FilterIn("starred_by_did", userIsFollowing)) 150 } ··· 190 } 191 192 func getTimelineFollows(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) { 193 + filters := make([]Filter, 0) 194 if userIsFollowing != nil { 195 filters = append(filters, FilterIn("user_did", userIsFollowing)) 196 }