com.xiaoleilu.hutool.db.dialect.impl.MysqlDialect Maven / Gradle / Ivy
package com.xiaoleilu.hutool.db.dialect.impl;
import com.xiaoleilu.hutool.db.Page;
import com.xiaoleilu.hutool.db.dialect.DialectName;
import com.xiaoleilu.hutool.db.sql.SqlBuilder;
import com.xiaoleilu.hutool.db.sql.Wrapper;
/**
* MySQL方言
* @author loolly
*
*/
public class MysqlDialect extends AnsiSqlDialect{
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;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy