com.jchanghong.db.dialect.impl.MysqlDialect Maven / Gradle / Ivy
The newest version!
package com.jchanghong.db.dialect.impl;
import com.jchanghong.db.Page;
import com.jchanghong.db.dialect.DialectName;
import com.jchanghong.db.sql.SqlBuilder;
import com.jchanghong.db.sql.Wrapper;
/**
* MySQL方言
* @author loolly
*
*/
public class MysqlDialect extends AnsiSqlDialect{
private static final long serialVersionUID = -3734718212043823636L;
public MysqlDialect() {
wrapper = new Wrapper('`');
}
@Override
protected SqlBuilder wrapPageSql(SqlBuilder find, Page page) {
return find.append(" LIMIT ").append(page.getStartPosition()).append(", ").append(page.getPageSize());
}
@Override
public DialectName dialectName() {
return DialectName.MYSQL;
}
}