[#2057] Implicit parameters/bindings for LIMIT ... OFFSET are not

exposed - Added integration test
This commit is contained in:
Lukas Eder 2012-12-27 11:45:04 +01:00
parent dbc3e518f3
commit 760be3e2bb
2 changed files with 14 additions and 0 deletions

View File

@ -49,6 +49,7 @@ import static org.jooq.impl.Factory.inline;
import static org.jooq.impl.Factory.lower;
import static org.jooq.impl.Factory.param;
import static org.jooq.impl.Factory.table;
import static org.jooq.impl.Factory.val;
import java.sql.Date;
import java.util.Arrays;
@ -309,6 +310,14 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T725,
assertEquals(Integer.valueOf(3), result.getValue(1, TBook_ID()));
}
@SuppressWarnings("unchecked")
@Test
public void testLimitBindValues() throws Exception {
Select<?> select = create().select().limit(1).offset(2);
assertSame(asList(1, 2), select.getBindValues());
assertSame(asList(val(1), val(2)), select.getParams().values());
}
@Test
public void testLimitNamedParams() throws Exception {
if (asList(ASE, INGRES).contains(getDialect())) {

View File

@ -1468,6 +1468,11 @@ public abstract class jOOQAbstractTest<
new OrderByTests(this).testLimit();
}
@Test
public void testLimitBindValues() throws Exception {
new OrderByTests(this).testLimitBindValues();
}
@Test
public void testLimitNested() throws Exception {
new OrderByTests(this).testLimitNested();