Fix Oracle issues

This commit is contained in:
Timo Westkämper 2013-10-18 22:57:16 +03:00
parent 816dd4b700
commit 2ee1bcdbd8
3 changed files with 4 additions and 1 deletions

View File

@ -1141,6 +1141,7 @@ public abstract class AbstractJPATest {
@Test
@NoBatooJPA
@ExcludeIn(ORACLE)
public void Substring2() {
QCompany company = QCompany.company;
StringExpression name = company.name;

View File

@ -81,6 +81,8 @@ public class OracleTemplates extends SQLTemplates {
add(Ops.MATCHES, "regexp_like({0},{1})");
add(Ops.StringOps.LOCATE, "instr({1},{0})");
add(Ops.StringOps.LOCATE2, "instr({1},{0},{2s})");
add(Ops.StringOps.LEFT, "substr({0},1,{1})");
add(Ops.StringOps.RIGHT, "substr({0},-{1s},length({0}))");
// Number
add(Ops.MathOps.CEIL, "ceil({0})");

View File

@ -748,7 +748,7 @@ public class SelectBase extends AbstractBaseTest{
query().from(employee).offset(3).list(employee.id);
// limit offset
expectedQuery = "select * from ( select a.*, rownum rn from ( select e.ID from EMPLOYEE e ) a) where rn > 3 and rn <= 7";
expectedQuery = "select * from ( select a.*, rownum rn from ( select e.ID from EMPLOYEE e ) a) where rn > 3 and rownum <= 4";
query().from(employee).limit(4).offset(3).list(employee.id);
}