feat: add Function interface and UnsupportedFunctionException to mapping layer#712
Merged
otaviojava merged 4 commits intoApr 2, 2026
Merged
Conversation
added 4 commits
March 31, 2026 22:18
Introduces the Function interface in the mapping semistructured layer to represent function expressions (e.g., ABS, LENGTH, UPPER). This is part of the Jakarta Data function expression support (issue eclipse-jnosql#643). DefaultFunction is a package-private record following the project convention for Default* implementations. Signed-off-by: Matheus Oliveira <hi@omatheusmesmo.dev>
Adds UnsupportedFunctionException, a runtime exception thrown when a NoSQL database provider does not support a given function expression. Signed-off-by: Matheus Oliveira <hi@omatheusmesmo.dev>
Covers factory methods, equality, toString, and edge cases for the Function interface. Signed-off-by: Matheus Oliveira <hi@omatheusmesmo.dev>
Covers message propagation and exception behavior for UnsupportedFunctionException. Signed-off-by: Matheus Oliveira <hi@omatheusmesmo.dev>
otaviojava
reviewed
Apr 2, 2026
| * | ||
| * @return the field name, never {@code null} | ||
| */ | ||
| String field(); |
Contributor
There was a problem hiding this comment.
In generatl we are using more the term attribute, but I don't have strong feelings on this one.
otaviojava
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
FunctionandUnsupportedFunctionExceptionto the semistructured mapping layer as pure type definitions — no grammar changes, no fluent API wiring, no mapper integration. Just the types that the next PRs will use.Step 1 of 3 from the PR #704 split, as requested by @otaviojava and @dearrudam.
Related Issue: Related to #643
Type of Contribution
Architectural and Design Decisions
Functionis a public interface inorg.eclipse.jnosql.mapping.semistructuredwith static factory methods (upper,lower,left,right,length,abs).DefaultFunctionis a package-private record in its own file, following the project's convention forDefault*implementations (and Otávio's feedback on PR Support for Function Expressions in JDQL and Fluent API (#643) #704).UnsupportedFunctionExceptionextendsMappingException(unchecked) so database drivers can signal unsupported functions without forcing checked exceptions on callers.Contribution Checklist
Validation Results