Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SQLJPA

public interface AddressRepo extends CrudRepository<Address, Long>{
List<Address> findBySex(String sex);
}

addressRepo.findBySex("여");



필터

...

조합및 연산자


SQLJPA
<WHERE 44 < agefindByAgeGreaterThan(int age);
<=WHERE 44 <= agefindByIdGreaterThanEqualfindByAgeGreaterThanEqual(int age);
>WHERE age < 44findByAgeLessThan(int age);
범위WHERE age BEETWEEN 10 and 20findByAgeBetween(int low,int high);
ANDWHERE 40 < age AND sex='남'findByAgeGreaterThanAndSex(int age,String sex);
ORWHERE 40 < age OR sex='여'findByAgeGreaterThanOrSex(int age,String sex);

...