Jakarta Query supports a variety of built-in functions via its grammar:
function_expression
: 'ABS' '(' scalar_expression ')'
| 'LENGTH' '(' scalar_expression ')'
| 'LOWER' '(' scalar_expression ')'
| 'UPPER' '(' scalar_expression ')'
| 'LEFT' '(' scalar_expression ',' scalar_expression ')'
| 'RIGHT' '(' scalar_expression ',' scalar_expression ')'
These expressions are valid in WHERE clauses of string-based queries.
🎯 Goal
Enable support in Eclipse JNoSQL for the above function_expression types when using Jakarta Query integration.
🔍 Examples
Support should include queries such as:
SELECT * FROM Customer WHERE LENGTH(name) > 5
SELECT * FROM Product WHERE LOWER(category) = 'electronics'
SELECT * FROM Book WHERE ABS(price) > 10
SELECT * FROM Name WHERE LEFT(name, 2) = 'Jo'
SELECT * FROM Name WHERE RIGHT(name, 1) = 'y'
✅ With Parameters
Queries with parameters must also be supported:
SELECT * FROM Customer WHERE LENGTH(:name) > :minLength
SELECT * FROM Product WHERE LOWER(:category) = 'electronics'
SELECT * FROM Customer WHERE LEFT(:name, :quantity) = 'Jo'
Java example:
template.query("SELECT * FROM Customer WHERE LEFT(:name, :len) = 'Jo'", Customer.class)
.bind("name", "Johnathan")
.bind("len", 2)
.result();
✅ Tasks
Jakarta Query supports a variety of built-in functions via its grammar:
These expressions are valid in WHERE clauses of string-based queries.
🎯 Goal
Enable support in Eclipse JNoSQL for the above
function_expressiontypes when using Jakarta Query integration.🔍 Examples
Support should include queries such as:
✅ With Parameters
Queries with parameters must also be supported:
Java example:
✅ Tasks
function_expressiontypes.:name,:len) can be bound in function expressions.