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

feat[data-export]:add format query button to allow users to format SOQL queries #361

Open
wants to merge 48 commits into
base: releaseCandidate
Choose a base branch
from

Conversation

dyncan
Copy link
Contributor

@dyncan dyncan commented Mar 20, 2024

Describe your changes

Add a "Format Query" button to the [Data Export] section, allowing users to format their SOQL query for an enhanced view of the query's structure

Note: Currently the "Format Query" button does not support Comment and SOSL.

Issue ticket number and link

N/A

Checklist before requesting a review

  • I have read and understand the Contributions section
  • Target branch is releaseCandidate and not master
  • I have performed a self-review of my code
  • I ran the unit tests and my PR does not break any tests
  • I documented the changes I've made on the CHANGES.md and followed actual conventions
  • I added a new section on how-to.md (optional)

tprouvot and others added 30 commits November 8, 2023 14:47
Add update api how to
## Describe your changes

## Issue ticket number and link

## Checklist before requesting a review
- [ ] I have read and understand the [Contributions
section](https://github.com/tprouvot/Salesforce-Inspector-reloaded#contributions)
- [ ] Target branch is releaseCandidate and not master
- [ ] I have performed a self-review of my code
- [ ] I ran the [unit
tests](https://github.com/tprouvot/Salesforce-Inspector-reloaded#unit-tests)
and my PR does not break any tests
- [ ] I documented the changes I've made on the
[CHANGES.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/CHANGES.md)
and followed actual conventions
- [ ] I added a new section on
[how-to.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/docs/how-to.md)
(optional)
## Describe your changes

## Issue ticket number and link

## Checklist before requesting a review
- [x] I have read and understand the [Contributions
section](https://github.com/tprouvot/Salesforce-Inspector-reloaded#contributions)
- [x] Target branch is releaseCandidate and not master
- [x] I have performed a self-review of my code
- [x] I ran the [unit
tests](https://github.com/tprouvot/Salesforce-Inspector-reloaded#unit-tests)
and my PR does not break any tests
- [x] I documented the changes I've made on the
[CHANGES.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/CHANGES.md)
and followed actual conventions
- [ ] I added a new section on
[how-to.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/docs/how-to.md)
(optional)

---------

Co-authored-by: Mehdi Cherfaoui <25982646+mehdisfdc@users.noreply.github.com>
Add how to test graphQL query
@tprouvot
Copy link
Owner

Hi @dyncan
Thanks for this PR !

I think that the 'Format Query' button may be useful for users but I'm a little bit annoyed by adding a 287 KB file for this since minified react only weights 124 KB.

I would prefer a much lighter solution to handle the formating of SOQL

@dyncan
Copy link
Contributor Author

dyncan commented Mar 20, 2024

Hi @tprouvot
Thanks for the feedback.

I understand your concern, I'll look into alternatives and update accordingly.

@tprouvot
Copy link
Owner

Hi @dyncan,
Have you considered other options for formatting ?

@dyncan
Copy link
Contributor Author

dyncan commented Mar 29, 2024

@tprouvot Currently, no better alternative has been found. I believe this library effectively resolves the issue of SOQL formatting. I also attempted to repackage and optimize the library’s source code using webpack, yet the size of the package still exceeds 200KB.

@tprouvot
Copy link
Owner

Hi @dyncan,
I'm not aware of the framework but I think our need is much more lighter than what soql-parser.js can do.
Have you considered creating a function which parses the query for the basics needs of formatting ?

@dyncan
Copy link
Contributor Author

dyncan commented May 16, 2024

Hi @tprouvot
Formatting SOQL requires considering various scenarios, such as subqueries and nested subqueries, and complex where conditions, etc. which makes it somewhat complex. A few weeks ago, I implemented a simplified version that only supports basic SOQL queries (without subqueries ), and supporting more complex SOQL might be challenging.

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.

None yet

2 participants