The Jakarta Query specification defines support for function expressions such as ABS(), LENGTH(), LOWER(), UPPER(), LEFT(), and RIGHT().
Currently, Jakarta NoSQL does not expose these functions in its fluent query API. This proposal introduces a structured way to represent and use these functions in queries using the fluent API.
💡 Motivation
Adding function support at the fluent level will:
- Allow users to express richer queries without string-based parsing
- Improve type safety
- Increase developer productivity
- Support use cases already defined in Jakarta Query
This allows Jakarta NoSQL to integrate more deeply with the Jakarta Query grammar while providing an intuitive developer experience.
✅ Example Usage
template.select(Word.class)
.where(Function.left("term", 2))
.eq("Ja")
.result();
template.select(Word.class)
.where(Function.upper("meaning"))
.eq("COFFEE")
.result();
template.select(Product.class)
.where(Function.abs("price"))
.gt(10)
.result();
📌 Tasks
The Jakarta Query specification defines support for function expressions such as
ABS(),LENGTH(),LOWER(),UPPER(),LEFT(), andRIGHT().Currently, Jakarta NoSQL does not expose these functions in its fluent query API. This proposal introduces a structured way to represent and use these functions in queries using the fluent API.
💡 Motivation
Adding function support at the fluent level will:
This allows Jakarta NoSQL to integrate more deeply with the Jakarta Query grammar while providing an intuitive developer experience.
✅ Example Usage
📌 Tasks
Design the
FunctionAPI class (e.g., static factory methods)Integrate
FunctionintoWhereClauseexpressionsUpdate the
Template.select()fluent chain to accept function expressionsAdd examples and usage documentation in the specification
Implement TCK tests for:
LEFT()RIGHT()UPPER()LOWER()LENGTH()ABS()