Skip to content

Query builder#232

Merged
phertyameen merged 6 commits intoMindBlockLabs:mainfrom
Lynndabel:QueryBuilder
Jan 31, 2026
Merged

Query builder#232
phertyameen merged 6 commits intoMindBlockLabs:mainfrom
Lynndabel:QueryBuilder

Conversation

@Lynndabel
Copy link
Contributor

closes #227
Refactor several services to stop using createQueryBuilder and instead use TypeORM’s repository methods (find, findAndCount) with FindOptionsWhere.

Details

  • Puzzles:
    • findAll now uses findAndCount with filters and pagination.
    • getDailyQuestPuzzles now uses find + in-memory shuffle for randomness.
  • Progress:
    • History, category stats, overall stats, and user progress stats now use find / findAndCount with in-memory aggregation.
  • Quests:
    • Daily quest puzzle selection now uses find + in-memory shuffle instead of ORDER BY RANDOM().

All filters, relations, pagination, and response shapes are preserved.

@phertyameen
Copy link
Member

@Lynndabel because of time, I will mark this issue as done in the drips app and review later. Any complements will come later after my review

@Lynndabel
Copy link
Contributor Author

@Lynndabel because of time, I will mark this issue as done in the drips app and review later. Any complements will come later after my review

Ok, Thank you. Please let me know if there are corrections to be made at any point.

Copy link
Member

@phertyameen phertyameen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did justice to the methods. Everything works as expected. I see you've replaced other providers that were not part of the issue also. It will be great to stick to the issue description next time. Anyway, thanks for your contribution.

@phertyameen phertyameen merged commit aa75028 into MindBlockLabs:main Jan 31, 2026
3 checks passed
@Lynndabel
Copy link
Contributor Author

You did justice to the methods. Everything works as expected. I see you've replaced other providers that were not part of the issue also. It will be great to stick to the issue description next time. Anyway, thanks for your contribution.

Thank you for the feedback and compliment. I will stick to that moving forward. Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Query Builder Logic to TypeORM Find Options

2 participants