@SpringBootTest
@Transactional
public class QuerydslBasicTest {
@Test
public void constant() {
Tuple result = queryFactory
.select(member.username, Expressions.constant("A"))
.from(member)
.fetchFirst();
}
}
@SpringBootTest
@Transactional
public class QuerydslBasicTest {
@Test
public void concat() {
String result = queryFactory
.select(member.username.concat("_").concat(member.age.stringValue()))
.from(member)
.where(member.username.eq("member1"))
.fetchOne();
}
}