From 36d7e97d919bedc6c33c81f4025ce0e5617d3f01 Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Wed, 6 Sep 2023 15:22:34 -0500 Subject: [PATCH] Keyword list is missing some keywords from the JavaDoc and BNF Signed-off-by: Nathan Rauh --- spec/src/main/asciidoc/repository.asciidoc | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/spec/src/main/asciidoc/repository.asciidoc b/spec/src/main/asciidoc/repository.asciidoc index 50916086..beed4378 100644 --- a/spec/src/main/asciidoc/repository.asciidoc +++ b/spec/src/main/asciidoc/repository.asciidoc @@ -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 @@ -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 @@ -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 @@ -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.