org.iartisan.runtime.jdbc.dialects.MySQLDialect Maven / Gradle / Ivy
package org.iartisan.runtime.jdbc.dialects;
import org.iartisan.runtime.jdbc.Dialect;
/**
*
*
* @author King
* @since 2017/6/22
*/
@Deprecated
public class MySQLDialect implements Dialect {
private static MySQLDialect dialect = null;
private MySQLDialect() {}
@Override
public String buildPaginationSQL(String originalSql, int offset, int limit) {
StringBuilder sql = new StringBuilder(originalSql);
sql.append(" LIMIT ").append(offset).append(",").append(limit);
return sql.toString();
}
public static MySQLDialect newInstance() {
if (null == dialect) {
dialect = new MySQLDialect();
}
return dialect;
}
}