Spring Data ArangoDB can derive the queries from method names. Following table summarizes the keyword and respective repository method.
Keyword |
Example |
Description |
IsGreaterThan, GreaterThan, After |
findByAgeGreaterThan(int age) |
doc.age > age |
IsGreaterThanEqual, GreaterThanEqual |
findByAgeIsGreaterThanEqual(int age) |
doc.age >= age |
IsLessThan, LessThan, Before |
findByAgeIsLessThan(int age) |
doc.age < age |
IsLessThanEqual, LessThanEqual |
findByAgeLessThanEqual(int age) |
doc.age <= age |
IsBetween, Between |
findByAgeBetween(int lower, int upper) |
lower < doc.age < upper |
IsNotNull, NotNull |
findByNameNotNull() |
doc.name != null |
IsNull, Null |
findByNameNull() |
doc.name == null |
IsLike, Like |
findByNameLike(String name) |
doc.name LIKE name |
IsNotLike, NotLike |
findByNameNotLike(String name) |
NOT(doc.name LIKE name) |
IsStartingWith, StartingWith, StartsWith |
findByNameStartsWith(String prefix) |
doc.name LIKE prefix |
IsEndingWith, EndingWith, EndsWith |
findByNameEndingWith(String suffix) |
doc.name LIKE suffix |
Regex, MatchesRegex, Matches |
findByNameRegex(String pattern) |
REGEX_TEST(doc.name, name, ignoreCase) |
|
findByFirstName(String name) |
doc.firstName == name |
IsTrue, True |
findByActiveTrue() |
doc.active == true |
IsFalse, False |
findByActiveFalse() |
doc.active == false |
Is, Equals |
findByAgeEquals(int age) |
doc.age == age |
IsNot, Not |
findByAgeNot(int age) |
doc.age != age |
IsIn, In |
findByNameIn(String[] names) |
doc.name IN names |
IsNotIn, NotIn |
findByNameIsNotIn(String[] names) |
doc.name NOT IN names |
No comments:
Post a Comment