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

Validation of selected items with result class fields #9

Open
cmcgee-mac opened this issue Feb 8, 2021 · 0 comments
Open

Validation of selected items with result class fields #9

cmcgee-mac opened this issue Feb 8, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@cmcgee-mac
Copy link
Collaborator

With the jsqlparser it should be possible to visit any selected items to see if there are any specified names so that they could be validated against the result class. Note that this will not be possible with wildcards.

Something like this could be used to find the selected items from a plain select.

PlainSelect plainSelect = (PlainSelect) selectStatement.getSelectBody();
List selectItems = plainSelect.getSelectItems();

SelectItem has three subclasses, but only SelectExpressionItem has aliases that could be used for static validation.

@cmcgee-mac cmcgee-mac added the enhancement New feature or request label Feb 8, 2021
@cmcgee-mac cmcgee-mac changed the title Validation of selected items with result class Validation of selected items with result class fields Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant