[#2580] Added failing integration test

This commit is contained in:
Lukas Eder 2013-09-23 15:46:12 +02:00
parent 9f937fd944
commit 2a227ef914
2 changed files with 31 additions and 5 deletions

View File

@ -314,6 +314,27 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
assertEquals(Integer.valueOf(2), result.getValue(0, TBook_ID()));
assertEquals(Integer.valueOf(3), result.getValue(1, TBook_ID()));
}
@Test
public void testLimitDistinct() throws Exception {
// [#2580] The various emulations using ROW_NUMBER() might be tricky when
// used with DISTINCT
assertEquals(1, (int)
create().selectDistinct(TBookToBookStore_BOOK_ID())
.from(TBookToBookStore())
.orderBy(TBookToBookStore_BOOK_ID())
.limit(1)
.fetchOne(TBookToBookStore_BOOK_ID()));
assertEquals(2, (int)
create().selectDistinct(TBookToBookStore_BOOK_ID())
.from(TBookToBookStore())
.orderBy(TBookToBookStore_BOOK_ID())
.limit(1)
.offset(1)
.fetchOne(TBookToBookStore_BOOK_ID()));
}
@Test

View File

@ -1802,11 +1802,16 @@ public abstract class jOOQAbstractTest<
public void testOrderByAndLimit() throws Exception {
new OrderByTests(this).testOrderByAndLimit();
}
@Test
public void testLimit() throws Exception {
new OrderByTests(this).testLimit();
}
@Test
public void testLimit() throws Exception {
new OrderByTests(this).testLimit();
}
@Test
public void testLimitDistinct() throws Exception {
new OrderByTests(this).testLimitDistinct();
}
@Test
public void testLimitAliased() throws Exception {