Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider moving function from the Jakarta NoSQL Template to Jakarta Data #108

Open
njr-11 opened this issue Jan 9, 2023 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@njr-11
Copy link
Contributor

njr-11 commented Jan 9, 2023

I noticed function being added to Jakarta NoSQL Template under jakartaee/nosql#151 that seems like it could be common with relational databases. We should consider if this or something similar can be made common to both relational and NoSQL databases under Jakarta Data. This is likely something to look at/consider after we get the repository pattern further along, not to start on yet.

UPDATED WITH MORE DETAIL:

Here's the example from the Jakarta NoSQL issue that I noticed,

template.select(Book.class).where("category").eq("Java").getResult();

template.delete(Person.class).where("id").eq("id").execute();

It reminds me of Spring's Querydsl extension,

books.findAll(book.category.isNotNull().and(
              book.category.startsWithIgnoreCase("Java")));

Both Spring and Micronaut also have a JPA CriteriaBuilder-based approach as well by having the repository interface extend a JpaSpecificationExecutor<EntityType> interface.

I can see why Jakarta NoSQL would be hesitant to depend on the JPA criteria builder from the Jakarta Persistence spec, but it would be nice if a common solution could be found rather than adding function to Jakarta NoSQL that looks like it ought to be common to relational databases/Jakarta Data.

@njr-11 njr-11 added the enhancement New feature or request label Jan 9, 2023
@graemerocher
Copy link
Contributor

What is "function"? This needs more definition of what is being proposed here

@keilw
Copy link
Member

keilw commented Jan 15, 2023

That "function" is similar to the Spring Data Template Framework

@njr-11
Copy link
Contributor Author

njr-11 commented Feb 18, 2023

I'm reopening this because I think it was closed by mistake. It still needs investigation. If the intent was to target the investigation for a future spec release, that can be done by setting the Milestone to "Jakarta Data Future".

@njr-11 njr-11 reopened this Feb 18, 2023
@otaviojava
Copy link
Contributor

ops, Yeap.
My mistake.
Thank you @njr-11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants