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

Improve Platform Event Channels query #47

Merged
merged 3 commits into from
May 22, 2024

Conversation

mehdicherf
Copy link
Contributor

I believe Platform Event channels entities start with an e (KeyPrefix in EntityDefinition).

So instead of querying all entities with QualifiedApiName ending with and e and then excluding the records that are not platform events, it should be more efficient to simply query entities with KeyPrefix starting by e.

@pozil
Copy link
Owner

pozil commented May 21, 2024

Thanks for the PR @mehdisfdc, this is a great idea.
Could you run prettier on the Apex file that you modified?

@mehdicherf
Copy link
Contributor Author

Thanks for the PR @mehdisfdc, this is a great idea. Could you run prettier on the Apex file that you modified?

My bad. Done!

Copy link
Owner

@pozil pozil left a comment

Choose a reason for hiding this comment

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

Almost there, I ran some tests and it looks good.
Can you address my suggestion?

src/main/default/classes/StreamingMonitorController.cls Outdated Show resolved Hide resolved
Co-authored-by: Philippe Ozil <[email protected]>
@mehdicherf mehdicherf requested a review from pozil May 22, 2024 08:28
@pozil
Copy link
Owner

pozil commented May 22, 2024

Perfect, thanks again for the contribution. I'll create a new release.

@pozil pozil merged commit b36519c into pozil:master May 22, 2024
1 of 2 checks passed
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.

2 participants