[Use Case]: Visitors
- Dominant language
- Java
- Stars
- 150
- Forks
- 37
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 34
Description
### As a ...
- [ ] Application user/user of the configuration itself
- [ ] API user (application developer)
- [ ] SPI user (container or runtime developer)
- [x] Specification implementer
### I need to be able to ...
Visit the tree.
### Which enables me to ...
More easily transform `Restriction`s and `Expression`s.
### Additional information
Our expressions/restrictions API is getting quite complex and powerful (which is how these things tend to go).
This has me, as an implementor of the specification now turning my thoughts to how to actually translate all this stuff to SQL/JPQL/Criteria objects.
On thing that I guess might make this easier would be an SPI `Visitor` interface which spec implementors can implement to do the transformation, instead of having to do lots of type switching.
Contributor guide
Research direction
Start with the Restriction and Expression APIs described in the issue, focusing on how specification implementers transform them to SQL, JPQL, or Criteria objects. Done means an agreed SPI Visitor interface that supports traversing the tree without extensive type switching.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100