Skip to content

Commit

Permalink
Merge branch 'release/v1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
YukiOnishi1129 committed Jan 4, 2025
2 parents 5757732 + f683318 commit 59f0bab
Show file tree
Hide file tree
Showing 68 changed files with 2,888 additions and 201 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (fafa *favoriteArticleFolderPersistenceAdapter) GetFavoriteArticleFolders(c
q := []qm.QueryMod{
qm.Where("favorite_article_folders.user_id = ?", req.GetUserId()),
qm.GroupBy("favorite_article_folders.id"),
qm.OrderBy("favorite_article_folders.created_at ASC"),
qm.OrderBy("favorite_article_folders.title ASC"),
}

if !req.GetIsAllFetch().GetValue() {
Expand All @@ -46,7 +46,7 @@ func (fafa *favoriteArticleFolderPersistenceAdapter) GetFavoriteArticleFolders(c
}

if req.GetCursor() != nil {
q = append(q, qm.Where("favorite_article_folders.created_at > (SELECT created_at FROM favorite_article_folders WHERE id = ?)", req.GetCursor().GetValue()))
q = append(q, qm.Where("favorite_article_folders.title > (SELECT title FROM favorite_article_folders WHERE id = ?)", req.GetCursor().GetValue()))
}

if req.GetKeyword().GetValue() != "" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ func (m *myFeedFolderPersistenceAdapter) GetMyFeedFolders(ctx context.Context, r
q := []qm.QueryMod{
qm.Where("my_feed_folders.user_id = ?", req.GetUserId()),
qm.Load(qm.Rels(entity.MyFeedFolderRels.MyFeeds)),
qm.OrderBy("my_feed_folders.created_at ASC"),
qm.OrderBy("my_feed_folders.title ASC"),
}

if !req.GetIsAllFetch().GetValue() {
q = append(q, qm.Limit(limit))
}

if req.GetCursor() != "" {
q = append(q, qm.Where("my_feed_folders.created_at > (SELECT created_at FROM my_feed_folders WHERE id = ?)", req.GetCursor()))
q = append(q, qm.Where("my_feed_folders.title > (SELECT title FROM my_feed_folders WHERE id = ?)", req.GetCursor()))
}

if req.GetKeyword().GetValue() != "" {
Expand Down
Loading

0 comments on commit 59f0bab

Please sign in to comment.