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

Keyword list consistency with JavaDoc and BNF #249

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion spec/src/main/asciidoc/repository.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,30 @@ Jakarta Data implementations support the following list of predicate keywords to
|The `or` operator.
|findByNameOrYear

|Not
|Negates the condition that immediately follows the `Not` keyword. When used without a subsequent keyword, means not equal to.
|findByNameNotLike

|Between
|Find results where the property is between the given values
|findByDateBetween

|Contains
|For Collection attributes, matches if the collection includes the value. For String attributes, a substring of the String must match the value, which can be a pattern.
|findByPhoneNumbersContains

|Empty
|Find results where the property is an empty collection or has a null value.
|deleteByPendingTasksEmpty

|EndsWith
|Matches String values with the given ending, which can be a pattern.
|findByProductNameEndsWith

|First
|For a query with ordered results, limits the quantity of results to the number following First, or if there is no subsequent number, to a single result.
|findFirst10By

|LessThan
|Find results where the property is less than the given value
|findByAgeLessThan
Expand All @@ -386,7 +402,7 @@ Jakarta Data implementations support the following list of predicate keywords to
|findByAgeGreaterThanEqual

|Like
|Finds string values "like" the given expression
|Matches String values against the given pattern.
|findByTitleLike

|IgnoreCase
Expand All @@ -401,6 +417,10 @@ Jakarta Data implementations support the following list of predicate keywords to
|Finds results where the property has a null value.
|findByYearRetiredNull

|StartsWith
|Matches String values with the given beginning, which can be a pattern.
|findByFirstNameStartsWith

|True
|Finds results where the property has a boolean value of true.
|findBySalariedTrue
Expand All @@ -427,6 +447,10 @@ Jakarta Data implementations support the following list of predicate keywords to

|===

====== Patterns

Wildcard characters for patterns are determined by the data access provider. For relational databases, `_` matches any one character and `%` matches 0 or more characters.

====== Logical Operator Precedence

For relational databases, the logical operator `And` takes precedence over `Or`, meaning that `And` is evaluated on conditions before `Or` when both are specified on the same method. For other database types, the precedence is limited to the capabilities of the database. For example, some graph databases are limited to precedence in traversal order.
Expand Down