Skip to content

Validation of selected items with result class fields #9

@cmcgee-mac

Description

@cmcgee-mac

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions