@Test public void getLimitStringWithPlaceHolader3() { assertEquals("select * from user limit #{limit}", dialect.getLimitString("select * from user", 0,"#{offset}", 0,"#{limit}")); assertEquals("select * from user limit #{offset},#{limit}", dialect.getLimitString("select * from user", 12, "#{offset}",0,"#{limit}")); }
public String getLimitString(String sql, int offset,String offsetPlaceholder, int limit, String limitPlaceholder) { if (offset > 0) { return sql + " limit "+offsetPlaceholder+","+limitPlaceholder; } else { return sql + " limit "+limitPlaceholder; } }
MySQLDialect extends Dialect { public String getLimitString(String sql, int offset,String offsetPlaceholder, int limit, String limitPlaceholder) { if (offset > 0) { return sql + " limit "+offsetPlaceholder+","+limitPlaceholder; } else { return sql + " limit "+limitPlaceholder; } } }
MySQLDialect extends Dialect { public String getLimitString(String sql, int offset,String offsetPlaceholder, int limit, String limitPlaceholder) { if (offset > 0) { return sql + " limit "+offsetPlaceholder+","+limitPlaceholder; } else { return sql + " limit "+limitPlaceholder; } }  }
MySQLDialect extends Dialect { public String getLimitString(String sql, int offset,String offsetPlaceholder, int limit, String limitPlaceholder) { if (offset > 0) { return sql + " limit "+offsetPlaceholder+","+limitPlaceholder; } else { return sql + " limit "+limitPlaceholder; } }  boolean supportsLimitOffset(); boolean supportsLimit(); String getLimitString(String sql, int offset,String offsetPlaceholder, int limit, String limitPlaceholder); }
MySQLDialect extends Dialect { public String getLimitString(String sql, int offset,String offsetPlaceholder, int limit, String limitPlaceholder) { if (offset > 0) { return sql + " limit "+offsetPlaceholder+","+limitPlaceholder; } else { return sql + " limit "+limitPlaceholder; } }  boolean supportsLimitOffset(); boolean supportsLimit(); String getLimitString(String sql, int offset,String offsetPlaceholder, int limit, String limitPlaceholder);  }