@@ -0,0 +1,1328 @@
+package com.github.pagehelper.parser.impl;%0A%0Aimport com.github.pagehelper.Page;%0Aimport org.apache.ibatis.mapping.BoundSql;%0Aimport org.apache.ibatis.mapping.MappedStatement;%0A%0Aimport java.util.Map;%0A%0A/**%0A * Take note that at least one column%0A * needs to be defined for ORDER BY%0A * in oder for OFFSET .. ROWS to work%0A */%0Apublic class SqlServer2012Dialect extends AbstractParser %7B%0A%0A    @Override%0A    public String getPageSql(String sql) %7B%0A        StringBuilder sqlBuilder = new StringBuilder(sql.length() + 14);%0A        sqlBuilder.append(sql);%0A        sqlBuilder.append(%22 OFFSET ? ROWS FETCH NEXT ? ROWS ONLY%22);%0A        return sqlBuilder.toString();%0A    %7D%0A%0A    @Override%0A    @SuppressWarnings(%22unchecked%22)%0A    public Map setPageParameter(MappedStatement ms, Object parameterObject, BoundSql boundSql, Page page) %7B%0A%0A        Map paramMap = super.setPageParameter(ms, parameterObject, boundSql, page);%0A%0A        // OFFSET (@PageNumber-1)*@RowsPerPage ROWS%0A        /**%0A        log.debug( %22page.getPageNum() = %7B%7D, page.getEndRow() = %7B%7D, page.getStartRow = %7B%7D%22,%0A            page.getPageNum(),%0A            page.getEndRow(),%0A            page.getStartRow()%0A        );%0A        **/%0A%0A        paramMap.put(PAGEPARAMETER_FIRST, page.getStartRow() );%0A        paramMap.put(PAGEPARAMETER_SECOND, page.getPageSize() );%0A        return paramMap;%0A    %7D%0A%0A%7D%0A

Support OFFSET ... ROWS in Sql Server 2012