-
Notifications
You must be signed in to change notification settings - Fork 195
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
Improved Criteria docs #3136
Merged
Improved Criteria docs #3136
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
24 changes: 0 additions & 24 deletions
24
src/main/docs/guide/dbc/dbcCriteriaSpecifications/otherRepositoryVariations.adoc
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
src/main/docs/guide/hibernate/hibernateSpecifications.adoc
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
In some cases, you need to build a query programmatically and at the runtime; for that, Micronaut Data supports Jakarta Persistence Criteria API 3.0. | ||
|
||
To implement queries that cannot be defined at the compile-time Micronaut Data introduces api:data.repository.JpaSpecificationExecutor[] repository interface that can be used to extend your repository interface: | ||
|
||
snippet::example.PersonRepository[project-base="doc-examples/jdbc-example",source="main" tags="repository",indent="0"] | ||
|
||
Each method expects a "specification" which is a functional interface with a set of Criteria API objects intended to build a query programmatically. |
File renamed without changes.
This file contains 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
File renamed without changes.
53 changes: 53 additions & 0 deletions
53
src/main/docs/guide/shared/criteriaSpecifications/otherRepositoryVariations.adoc
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Micronaut Data includes different variations of specification executor interface intended to be used with async or reactive repositories. | ||
|
||
.Builtin Variations of `JpaSpecificationExecutor` repository interface | ||
[cols=2*] | ||
|=== | ||
|*Interface* | ||
|*Description* | ||
|
||
|api:data.repository.jpa.JpaSpecificationExecutor[] | ||
|The default interface for querying, deleting and updating data | ||
|
||
|api:data.repository.jpa.async.AsyncJpaSpecificationExecutor[] | ||
|The async version of the specifications repository | ||
|
||
|api:data.repository.jpa.reactive.ReactiveStreamsJpaSpecificationExecutor[] | ||
|The reactive streams - `Publisher<>` version of the specifications repository | ||
|
||
|api:data.repository.jpa.reactive.ReactorJpaSpecificationExecutor[] | ||
|The Reactor version of the specifications repository | ||
|
||
|api:data.repository.jpa.kotlin.CoroutineJpaSpecificationExecutor[] | ||
|The Kotlin version of the interface that is using coroutines | ||
|
||
|=== | ||
|
||
.Each variation supports different Criteria specifications | ||
[cols=2*] | ||
|=== | ||
|*Interface* | ||
|*Description* | ||
|
||
|api:data.repository.jpa.criteria.PredicateSpecification[] | ||
|A simple interface that is producing `Predicate` using the `Root` and `CriteriaBuilder` | ||
|
||
|api:data.repository.jpa.criteria.QuerySpecification[] | ||
|The same as `PredicateSpecification` which also includes `CriteriaQuery` | ||
|
||
|api:data.repository.jpa.criteria.DeleteSpecification[] | ||
|The same as `PredicateSpecification` which also includes `CriteriaDelete` | ||
|
||
|api:data.repository.jpa.criteria.UpdateSpecification[] | ||
|The same as `PredicateSpecification` which also includes `CriteriaUpdate` | ||
|
||
|api:data.repository.jpa.criteria.CriteriaQueryBuilder[] | ||
|The builder of `CriteriaQuery` using `CriteriaBuilder` | ||
|
||
|api:data.repository.jpa.criteria.CriteriaUpdateBuilder[] | ||
|The builder of `CriteriaUpdate` using `CriteriaBuilder` | ||
|
||
|api:data.repository.jpa.criteria.CriteriaDeleteBuilder[] | ||
|The builder of `CriteriaDelete` using `CriteriaBuilder` | ||
|
||
|=== |
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were probably all copied from data-jdbc and this module uses only h2 and postgres so remove unused dependencies.