HHH-11509 - Infomix limit handler support for offset
This commit is contained in:
parent
0c7da58bda
commit
71768443bc
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
package org.hibernate.dialect;
|
||||
|
||||
import org.hibernate.dialect.pagination.InformixLimitHandler;
|
||||
import org.hibernate.dialect.pagination.Informix10LimitHandler;
|
||||
import org.hibernate.dialect.pagination.LimitHandler;
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@ public class Informix10Dialect extends InformixDialect {
|
|||
|
||||
@Override
|
||||
public LimitHandler getLimitHandler() {
|
||||
return new InformixLimitHandler();
|
||||
return Informix10LimitHandler.INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,13 @@ import java.util.Locale;
|
|||
|
||||
import org.hibernate.engine.spi.RowSelection;
|
||||
|
||||
public class InformixLimitHandler extends AbstractLimitHandler {
|
||||
public class Informix10LimitHandler extends AbstractLimitHandler {
|
||||
|
||||
public static Informix10LimitHandler INSTANCE = new Informix10LimitHandler();
|
||||
|
||||
private Informix10LimitHandler() {
|
||||
// Disallow instantiation
|
||||
}
|
||||
|
||||
@Override
|
||||
public String processSql(String sql, RowSelection selection) {
|
|
@ -10,20 +10,20 @@ import org.hibernate.engine.spi.RowSelection;
|
|||
import org.hibernate.testing.TestForIssue;
|
||||
import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase;
|
||||
import org.junit.Test;
|
||||
import org.hibernate.dialect.pagination.InformixLimitHandler;
|
||||
import org.hibernate.dialect.pagination.Informix10LimitHandler;
|
||||
import org.junit.Before;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class InformixLimitHandlerTestCase extends
|
||||
BaseNonConfigCoreFunctionalTestCase {
|
||||
|
||||
private InformixLimitHandler informixLimitHandler;
|
||||
private Informix10LimitHandler informixLimitHandler;
|
||||
|
||||
private final String TEST_SQL = "SELECT field FROM table";
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
informixLimitHandler = new InformixLimitHandler();
|
||||
informixLimitHandler = Informix10LimitHandler.INSTANCE;
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue