select2 Go - select - 출처: https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/select - 개요 http 요청 test를 작성하는법을 알아본다. goroutine 사용시 동기화를 위해 select를 이용해본다. - WebsiteRace example 두 URL을 받아서 HTTP GET 요청을 날렸을 때 먼저 응답한 URL을 반환하는 WebsiteRace 함수를 작성해보자. 만약 두 URL 모두 10초내로 답변이 없으면 error를 반환한다. 우선 요구사항에 맞게 간단하게 test 코드를 작성해보자. func TestRacer(t *testing.T) { slowURL := "http://www.facebook.com" fastURL := "http://www.q.. 2022. 1. 12. JPA - 객체지향 쿼리 언어 - Criteria 조회 - 참조: 자바 ORM 표준 JPA 프로그래밍 - 조회(select & multiselect) Criteria 에서 SELECT 절을 만드는 함수는 아래와 같다. /** * The CriteriaQuery interface defines functionality that is specific * to top-level queries. * * @param the type of the defined result * * @since 2.0 */ public interface CriteriaQuery extends AbstractQuery { CriteriaQuery select(Selection... selections); CriteriaQuery multiselect(List 2021. 8. 8. 이전 1 다음