Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: query runner orm #6397

Merged
merged 5 commits into from
Jul 25, 2024
Merged

Fix: query runner orm #6397

merged 5 commits into from
Jul 25, 2024

Conversation

magrinj
Copy link
Member

@magrinj magrinj commented Jul 24, 2024

Fix WorkspaceQueryRunner events using TwentyORM

Fix #6057

@magrinj magrinj marked this pull request as ready for review July 24, 2024 14:48
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

The pull request focuses on refactoring the WorkspaceQueryRunnerService to utilize TwentyORMGlobalManager for database operations, enhancing maintainability and reducing technical debt.

  • Refactored workspace-query-runner.service.ts: Integrated TwentyORMGlobalManager for CRUD operations, replacing custom methods.
  • Removed Methods: handleDeleteWorkspaceMember and handleDeleteBlocklistItem methods were removed.
  • Updated workspace-datasource.factory.ts: Simplified cache version logic using the nullish coalescing operator (??=).

Ensure thorough testing to validate ORM integration and edge case handling.

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@charlesBochet charlesBochet merged commit d0201e1 into main Jul 25, 2024
6 checks passed
@charlesBochet charlesBochet deleted the fix/query-runner-orm branch July 25, 2024 11:21
@@ -546,19 +590,9 @@ export class WorkspaceQueryRunnerService {
options,
);

// TODO START: remove this awful patch and use our upcoming custom ORM is developed
const deletedWorkspaceMember = await this.handleDeleteWorkspaceMember(
Copy link
Member

Choose a reason for hiding this comment

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

Great that you tackled this!
We can also delete the code for those functions, no?

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.

Remove handleDeleteWorkspaceMember and handleDeleteBlocklistItem from WorkspaceQueryRunnerService
3 participants