com.github.miemiedev.mybatis.paginator.dialect
类 SQLServer2005Dialect

java.lang.Object
  继承者 com.github.miemiedev.mybatis.paginator.dialect.Dialect
      继承者 com.github.miemiedev.mybatis.paginator.dialect.SQLServer2005Dialect

public class SQLServer2005Dialect
extends Dialect

作者:
badqiu, miemiedev

字段摘要
 
从类 com.github.miemiedev.mybatis.paginator.dialect.Dialect 继承的字段
boundSql, mappedStatement, pageBounds, pageParameters, parameterMappings, parameterObject, typeHandlerRegistry
 
构造方法摘要
SQLServer2005Dialect(org.apache.ibatis.mapping.MappedStatement mappedStatement, Object parameterObject, PageBounds pageBounds)
           
 
方法摘要
protected  String getLimitString(String sql, String offsetName, int offset, String limitName, int limit)
          Add a LIMIT clause to the given SQL SELECT The LIMIT SQL will look like: WITH query AS (SELECT TOP 100 percent ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __row_number__, * from table_name) SELECT * FROM query WHERE __row_number__ BETWEEN :offset and :lastRows ORDER BY __row_number__
 
从类 com.github.miemiedev.mybatis.paginator.dialect.Dialect 继承的方法
getCountSQL, getCountString, getPageSQL, getParameterMappings, getParameterObject, getSortString, init, setPageParameter
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

SQLServer2005Dialect

public SQLServer2005Dialect(org.apache.ibatis.mapping.MappedStatement mappedStatement,
                            Object parameterObject,
                            PageBounds pageBounds)
方法详细信息

getLimitString

protected String getLimitString(String sql,
                                String offsetName,
                                int offset,
                                String limitName,
                                int limit)
Add a LIMIT clause to the given SQL SELECT The LIMIT SQL will look like: WITH query AS (SELECT TOP 100 percent ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __row_number__, * from table_name) SELECT * FROM query WHERE __row_number__ BETWEEN :offset and :lastRows ORDER BY __row_number__

覆盖:
Dialect 中的 getLimitString
参数:
sql - The SQL statement to base the limit query off of.
offset - Offset of the first row to be returned by the query (zero-based)
limit - Maximum number of rows to be returned by the query
返回:
A new SQL statement with the LIMIT clause applied.


Copyright © 2015. All rights reserved.