Skip to content

Commit

Permalink
Keyword list is missing some keywords from the JavaDoc and BNF
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Rauh <[email protected]>
  • Loading branch information
njr-11 committed Sep 6, 2023
1 parent c3dd2fe commit 36d7e97
Showing 1 changed file with 25 additions and 1 deletion.
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

0 comments on commit 36d7e97

Please sign in to comment.