Querydsl SQL emulates paging of all the supports databases, so you can write directly
query.from(a)
.where(a.z.eq(1))
.limit(1)
.list(a);
If you need to write this via a subquery then like this
query.from(
new SQLSubQuery().from(a).where(a.z.eq(1)).list(a).as(a))
.where(rownum.loe(1))
.list(a);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…