+3
-2
appview/db/artifact.go
+3
-2
appview/db/artifact.go
·········
·········
+4
-3
appview/db/collaborators.go
+4
-3
appview/db/collaborators.go
·········
·········
+24
-137
appview/db/db.go
+24
-137
appview/db/db.go
············-runMigration(conn, logger, "add-deleted-and-edited-to-issue-comments", func(tx *sql.Tx) error {···-runMigration(conn, logger, "add-source-info-to-pulls-and-submissions", func(tx *sql.Tx) error {······-runMigration(conn, logger, "recreate-pulls-column-for-stacking-support", func(tx *sql.Tx) error {···············-runMigration(conn, logger, "rename-registrations-read-only-to-needs-upgrade", func(tx *sql.Tx) error {··················-runMigration(conn, logger, "remove-repo-at-pull-id-from-pull-submissions", func(tx *sql.Tx) error {············-func runMigration(c *sql.Conn, logger *slog.Logger, name string, migrationFn migrationFn) error {-err = tx.QueryRow("select exists (select 1 from migrations where name = ?)", name).Scan(&exists)-if (kind == reflect.Slice && rv.Type().Elem().Kind() != reflect.Uint8) || kind == reflect.Array {-if (kind == reflect.Slice && rv.Type().Elem().Kind() != reflect.Uint8) || kind == reflect.Array {
············+orm.RunMigration(conn, logger, "add-deleted-and-edited-to-issue-comments", func(tx *sql.Tx) error {···+orm.RunMigration(conn, logger, "add-source-info-to-pulls-and-submissions", func(tx *sql.Tx) error {······+orm.RunMigration(conn, logger, "recreate-pulls-column-for-stacking-support", func(tx *sql.Tx) error {···············+orm.RunMigration(conn, logger, "rename-registrations-read-only-to-needs-upgrade", func(tx *sql.Tx) error {··················+orm.RunMigration(conn, logger, "remove-repo-at-pull-id-from-pull-submissions", func(tx *sql.Tx) error {············
+4
-3
appview/db/follow.go
+4
-3
appview/db/follow.go
·········func getFollowStatuses(e Execer, userDid string, subjectDids []string) (map[string]models.FollowStatus, error) {
·········func getFollowStatuses(e Execer, userDid string, subjectDids []string) (map[string]models.FollowStatus, error) {
+21
-20
appview/db/issues.go
+21
-20
appview/db/issues.go
·········-func GetIssuesPaginated(e Execer, page pagination.Page, filters ...filter) ([]models.Issue, error) {·······································
·········+func GetIssuesPaginated(e Execer, page pagination.Page, filters ...orm.Filter) ([]models.Issue, error) {·······································
+8
-7
appview/db/label.go
+8
-7
appview/db/label.go
························-func NewLabelApplicationCtx(e Execer, filters ...filter) (*models.LabelApplicationCtx, error) {
························+func NewLabelApplicationCtx(e Execer, filters ...orm.Filter) (*models.LabelApplicationCtx, error) {
+5
-4
appview/db/language.go
+5
-4
appview/db/language.go
·········func UpdateRepoLanguages(tx *sql.Tx, repoAt syntax.ATURI, ref string, langs []models.RepoLanguage) error {
·········func UpdateRepoLanguages(tx *sql.Tx, repoAt syntax.ATURI, ref string, langs []models.RepoLanguage) error {
+14
-13
appview/db/notifications.go
+14
-13
appview/db/notifications.go
······-func GetNotificationsPaginated(e Execer, page pagination.Page, filters ...filter) ([]*models.Notification, error) {···-func GetNotificationsWithEntities(e Execer, page pagination.Page, filters ...filter) ([]*models.NotificationWithEntity, error) {···············func GetNotificationPreference(e Execer, userDid string) (*models.NotificationPreferences, error) {···-func GetNotificationPreferences(e Execer, filters ...filter) (map[syntax.DID]*models.NotificationPreferences, error) {···
······+func GetNotificationsPaginated(e Execer, page pagination.Page, filters ...orm.Filter) ([]*models.Notification, error) {···+func GetNotificationsWithEntities(e Execer, page pagination.Page, filters ...orm.Filter) ([]*models.NotificationWithEntity, error) {···············func GetNotificationPreference(e Execer, userDid string) (*models.NotificationPreferences, error) {···+func GetNotificationPreferences(e Execer, filters ...orm.Filter) (map[syntax.DID]*models.NotificationPreferences, error) {···
+6
-5
appview/db/pipeline.go
+6
-5
appview/db/pipeline.go
·········conditions = append(conditions, fmt.Sprintf("(%s and %s)", knotFilter.Condition(), rkeyFilter.Condition()))
······+func GetPipelineStatuses(e Execer, limit int, filters ...orm.Filter) ([]models.Pipeline, error) {···conditions = append(conditions, fmt.Sprintf("(%s and %s)", knotFilter.Condition(), rkeyFilter.Condition()))
+6
-5
appview/db/profile.go
+6
-5
appview/db/profile.go
···············
···············
+21
-20
appview/db/pulls.go
+21
-20
appview/db/pulls.go
························-pulls, err := GetPullsWithLimit(e, 1, FilterEq("repo_at", repoAt), FilterEq("pull_id", pullId))···-func GetPullSubmissions(e Execer, filters ...filter) (map[syntax.ATURI][]*models.PullSubmission, error) {···············// Only used when stacking to update contents in the event of a rebase (the interdiff should be empty).······
························+pulls, err := GetPullsWithLimit(e, 1, orm.FilterEq("repo_at", repoAt), orm.FilterEq("pull_id", pullId))···+func GetPullSubmissions(e Execer, filters ...orm.Filter) (map[syntax.ATURI][]*models.PullSubmission, error) {···············// Only used when stacking to update contents in the event of a rebase (the interdiff should be empty).······
+2
-1
appview/db/punchcard.go
+2
-1
appview/db/punchcard.go
······
······
+4
-3
appview/db/reference.go
+4
-3
appview/db/reference.go
············
······+func GetReferencesAll(e Execer, filters ...orm.Filter) (map[syntax.ATURI][]syntax.ATURI, error) {······
+4
-3
appview/db/registration.go
+4
-3
appview/db/registration.go
·········
·········
+6
-5
appview/db/repos.go
+6
-5
appview/db/repos.go
···············
···············
+6
-5
appview/db/spindle.go
+6
-5
appview/db/spindle.go
···············
···············
+5
-4
appview/db/star.go
+5
-4
appview/db/star.go
···············
···············
+4
-3
appview/db/strings.go
+4
-3
appview/db/strings.go
············
············
+9
-8
appview/db/timeline.go
+9
-8
appview/db/timeline.go
······func getTimelineRepos(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) {······func getTimelineStars(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) {···func getTimelineFollows(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) {···
······func getTimelineRepos(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) {······func getTimelineStars(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) {···func getTimelineFollows(e Execer, limit int, loggedInUserDid string, userIsFollowing []string) ([]models.TimelineEvent, error) {···
+25
-24
appview/ingester.go
+25
-24
appview/ingester.go
·············································
·············································
+16
-15
appview/issues/issues.go
+16
-15
appview/issues/issues.go
·······································
·······································
+19
-18
appview/knots/knots.go
+19
-18
appview/knots/knots.go
······························
······························
+5
-4
appview/labels/labels.go
+5
-4
appview/labels/labels.go
·········
·········
+3
-2
appview/middleware/middleware.go
+3
-2
appview/middleware/middleware.go
······
······
+5
-4
appview/notifications/notifications.go
+5
-4
appview/notifications/notifications.go
············
············
+11
-10
appview/notify/db/db.go
+11
-10
appview/notify/db/db.go
············func (n *databaseNotifier) NewIssueComment(ctx context.Context, comment *models.IssueComment, mentions []syntax.DID) {···············func (n *databaseNotifier) NewPullState(ctx context.Context, actor syntax.DID, pull *models.Pull) {······
············func (n *databaseNotifier) NewIssueComment(ctx context.Context, comment *models.IssueComment, mentions []syntax.DID) {···············func (n *databaseNotifier) NewPullState(ctx context.Context, actor syntax.DID, pull *models.Pull) {······
+3
-2
appview/oauth/handler.go
+3
-2
appview/oauth/handler.go
······
······
+12
-11
appview/pipelines/pipelines.go
+12
-11
appview/pipelines/pipelines.go
············
············
+2
-1
appview/pulls/opengraph.go
+2
-1
appview/pulls/opengraph.go
······
······
+19
-18
appview/pulls/pulls.go
+19
-18
appview/pulls/pulls.go
························
························
+10
-9
appview/repo/artifact.go
+10
-9
appview/repo/artifact.go
············
············
+3
-2
appview/repo/feed.go
+3
-2
appview/repo/feed.go
······func (rp *Repo) getRepoFeed(ctx context.Context, repo *models.Repo, ownerSlashRepo string) (*feeds.Feed, error) {-pulls, err := db.GetPullsWithLimit(rp.db, feedLimitPerType, db.FilterEq("repo_at", repo.RepoAt()))···
······func (rp *Repo) getRepoFeed(ctx context.Context, repo *models.Repo, ownerSlashRepo string) (*feeds.Feed, error) {+pulls, err := db.GetPullsWithLimit(rp.db, feedLimitPerType, orm.FilterEq("repo_at", repo.RepoAt()))···
+3
-2
appview/repo/index.go
+3
-2
appview/repo/index.go
······
······
+3
-2
appview/repo/opengraph.go
+3
-2
appview/repo/opengraph.go
······
······
+17
-16
appview/repo/repo.go
+17
-16
appview/repo/repo.go
·································
·································
+5
-4
appview/repo/repo_util.go
+5
-4
appview/repo/repo_util.go
······
······
+3
-2
appview/repo/settings.go
+3
-2
appview/repo/settings.go
······-defaultLabels, err := db.GetLabelDefinitions(rp.db, db.FilterIn("at_uri", rp.config.Label.DefaultLabelDefs))
······+defaultLabels, err := db.GetLabelDefinitions(rp.db, orm.FilterIn("at_uri", rp.config.Label.DefaultLabelDefs))
+5
-4
appview/serververify/verify.go
+5
-4
appview/serververify/verify.go
·········
·········
+25
-24
appview/spindles/spindles.go
+25
-24
appview/spindles/spindles.go
·······································
·······································
+6
-5
appview/state/gfi.go
+6
-5
appview/state/gfi.go
············
············
+6
-5
appview/state/knotstream.go
+6
-5
appview/state/knotstream.go
·········return fmt.Errorf("failed to look for repo in DB (%s/%s): %w", record.RepoDid, record.RepoName, err)···return fmt.Errorf("failed to look for repo in DB: nsid %s, rkey %s, %w", msg.Nsid, msg.Rkey, err)
·········return fmt.Errorf("failed to look for repo in DB (%s/%s): %w", record.RepoDid, record.RepoName, err)···return fmt.Errorf("failed to look for repo in DB: nsid %s, rkey %s, %w", msg.Nsid, msg.Rkey, err)
+13
-12
appview/state/profile.go
+13
-12
appview/state/profile.go
···························
···························
+2
-1
appview/state/spindlestream.go
+2
-1
appview/state/spindlestream.go
······
······
+9
-8
appview/state/state.go
+9
-8
appview/state/state.go
······-gfiLabel, err := db.GetLabelDefinition(s.db, db.FilterEq("at_uri", s.config.Label.GoodFirstIssue))············
······+gfiLabel, err := db.GetLabelDefinition(s.db, orm.FilterEq("at_uri", s.config.Label.GoodFirstIssue))············
+7
-6
appview/strings/strings.go
+7
-6
appview/strings/strings.go
············
············
+2
-1
appview/validator/issue.go
+2
-1
appview/validator/issue.go
···
···
+122
orm/orm.go
+122
orm/orm.go
···
···+func RunMigration(c *sql.Conn, logger *slog.Logger, name string, migrationFn migrationFn) error {+err = tx.QueryRow("select exists (select 1 from migrations where name = ?)", name).Scan(&exists)+if (kind == reflect.Slice && rv.Type().Elem().Kind() != reflect.Uint8) || kind == reflect.Array {+if (kind == reflect.Slice && rv.Type().Elem().Kind() != reflect.Uint8) || kind == reflect.Array {