일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- Proxy
- Spring Boot
- 김영한
- transaction
- springdatajpa
- spring
- 자바
- SpringBoot
- Android
- JPQL
- java
- 스프링 핵심 원리
- JDBC
- Exception
- Greedy
- Thymeleaf
- http
- jpa
- Servlet
- kotlin
- 백준
- 스프링 핵심 기능
- 스프링
- 인프런
- 알고리즘
- 그리디
- db
- AOP
- QueryDSL
- pointcut
- Today
- Total
목록Fetch (2)
개발자되기 프로젝트
1. SpringData Paging 활용 스프링 데이터의 Page, Pageable을 활용해보자. 전체 카운트를 한번에 조회하는 단순한 방법 데이터 내용과 전체 카운트를 별도로 조회하는 방법 2. 인터페이스에 두 가지 기능 추가 public interface MemberRepositoryCustom { List search(MemberSearchCondition condition); Page searchPageSimple(MemberSearchCondition condition, Pageable pageable); Page searchPageComplex(MemberSearchCondition condition, Pageable pageable); } 3. 전체 카운트를 한번에 조회하는 단순한 방법 s..
1. query 결과 조회 방법 fetch의 사전적 의미 : 가져오다. fetch() : 리스트 조회, 데이터 없으면 빈 리스트 반환 fetchOne() : 단 건 조회 결과가 없으면 : null 결과가 둘 이상이면 : com.querydsl.core.NonUniqueResultException fetchFirst() : limit(1).fetchOne() fetchResults() : 페이징 정보 포함, total count 쿼리 추가 실행 fetchCount() : count 쿼리로 변경해서 count 수 조회 2. 예제 fetchResults()의 경우 getResults()를 통해 contents를 꺼낼 수 있음. @Test public void resultFetch(){ List fetch = ..