Skip to content

Conversation

@pedrogaudencio
Copy link
Collaborator

  • Refactor searchRepositoryByCondition to reuse the same database session for both count and main queries, instead of creating a new session via db.GetEngine(ctx) for the count.
  • The count query is now performed before adding JOINs to the session, since JOINs are only needed for ordering by subject fields, not for counting repositories.

* Refactor searchRepositoryByCondition to reuse the same database session for both count and main queries, instead of creating a new session via db.GetEngine(ctx) for the count.
* The count query is now performed before adding JOINs to the session, since JOINs are only needed for ordering by subject fields, not for counting repositories.

Fixes okTurtles/forkana/issues/27
@pedrogaudencio pedrogaudencio self-assigned this Nov 3, 2025
@pedrogaudencio pedrogaudencio merged commit d626c76 into forkana/dev Nov 3, 2025
5 checks passed
@pedrogaudencio pedrogaudencio deleted the forkana/fix-session-in-search branch November 3, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants