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

6430 Part 1: remove all raw queries from the messaging and calendar modules #6572

Conversation

bosiraphael
Copy link
Contributor

Part 1 of #6430

  • Remove all repositories which contained raw queries in messaging module
  • Replace them using twentyORMManager

@bosiraphael bosiraphael linked an issue Aug 7, 2024 that may be closed by this pull request
@FelixMalfait
Copy link
Member

Great! FYI merge conflict with main

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 removes raw queries from the messaging and calendar modules, replacing them with ORM-based queries using twentyORMManager.

  • Removed Repositories: Deleted message-channel.repository.ts, message-participant.repository.ts, message-thread.repository.ts, and message.repository.ts to eliminate raw queries.
  • Updated Services: Replaced raw queries with ORM methods in google-apis.service.ts, messaging-channel-sync-status.service.ts, and messaging-messages-import.service.ts.
  • Modified Jobs: Updated messaging-blocklist-item-delete-messages.job.ts and messaging-message-list-fetch.cron.job.ts to use twentyORMManager.
  • Listener Changes: messaging-blocklist.listener.ts now uses ORM for repository access.
  • Module Adjustments: Removed raw query-based entities from auth.module.ts and messaging-common.module.ts.

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

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

LGTM, love when we simplify code!

@charlesBochet charlesBochet merged commit d1c278d into main Aug 13, 2024
6 checks passed
@charlesBochet charlesBochet deleted the 6430-remove-all-raw-queries-from-the-messaging-and-calendar-modules branch August 13, 2024 17:40
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.

Remove all raw queries from the messaging and calendar modules
3 participants