Currently, Jakarta NoSQL supports basic update operations via the Template interface. However, there is no fluent API available for building and executing update queries in a structured and readable way.
This proposal introduces a new fluent Update API that enables developers to construct update queries declaratively, similar to how select operations are handled.
💡 Motivation
A fluent update API aligns with the goal of Jakarta NoSQL to provide a type-safe, readable, and composable way of interacting with NoSQL databases.
It simplifies scenarios where developers need to:
- Update specific fields of one or more entities
- Apply conditions to match which entities to update
- Avoid loading entities in memory just to update them
✅ Example Usage
@Inject
Template template;
template.update(Word.class)
.set("meaning", "coffee")
.where("term")
.eq("java")
.execute();
The resulting query would match all Word entities with term = "java" and update the meaning field.
📌 Tasks
Currently, Jakarta NoSQL supports basic
updateoperations via theTemplateinterface. However, there is no fluent API available for building and executing update queries in a structured and readable way.This proposal introduces a new fluent Update API that enables developers to construct update queries declaratively, similar to how
selectoperations are handled.💡 Motivation
A fluent update API aligns with the goal of Jakarta NoSQL to provide a type-safe, readable, and composable way of interacting with NoSQL databases.
It simplifies scenarios where developers need to:
✅ Example Usage
The resulting query would match all
Wordentities withterm = "java"and update themeaningfield.📌 Tasks
Template.update(Class<T>)method