Keyword | 예시 |
Greater Than | findByAgeGreaterThan(int age) |
Less Than | findByAgeLessThan(int age) |
Between | findByAgeBetween(int from, int to) |
IsNotNull, NotNull | findByFirstnameNotNull() |
IsNull, Null | findByFirstnameNull() |
Like | findByFirstnameLike(String name) |
Regex | findByFirstnameRegex(String firstname) |
(No keyword) | findByFirstname(String name) |
Not | findByFirstnameNot(String name) |
Near | findByLocationNear(Point point) |
Within | findByLocationWithin(Circle circle) |
Within | findByLocationWithin(Box box) |
IsTrue, True | findByActiveIsTrue() |
IsFalse, False | findByActiveIsFalse() |
Exists | findByLocationExists(boolean exists) |
참고 👇
https://docs.spring.io/spring-data/mongodb/docs/1.2.0.RELEASE/reference/html/mongo.repositories.html
반응형
'DB > MongoDB' 카테고리의 다른 글
[Ubuntu] MongoDB 설치 (0) | 2024.04.22 |
---|---|
Mongosh 사용 (0) | 2023.01.29 |
MongoDB (0) | 2023.01.13 |
MongoDB 설치 (0) | 2023.01.13 |