public class SqlServerDialect extends AnsiDialect
Limit clause:
select TOP 2 name from author
name, patternORDER_BY
Constructor and Description |
---|
SqlServerDialect() |
Modifier and Type | Method and Description |
---|---|
String |
buildQueryPaging(String sqlText,
int offset,
int max)
Build a paginate query accordingly data base dialect
|
String |
getSqlPatternPaging()
LIMIT clause for SqlServer, where TOP is a parameter from
String.format
|
addFeature, buildQueryCount, buildQueryPaging, countOccurrencesOf, getAccessId, getAccessRevision, getMaxOfParameters, getSqlPatternCount, name, setMaxOfParameters, sqlEndsWithOrderBy, sqlEndWithForUpdate, sqlStartWithSelect, sqlStartWithSelectOrDistinct, supportsFeature, supportsParmMark
public SqlServerDialect()
public String getSqlPatternPaging()
getSqlPatternPaging
in interface SqlDialect
getSqlPatternPaging
in class AnsiDialect
WITH query AS (
SELECT inner_query.*
, ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as _jkniv_rownum_
FROM ( select ID, SERVICO from ine.configuracao ) inner_query
)
SELECT * FROM query WHERE _jkniv_rownum_ >= 3 AND _jkniv_rownum_ < 5 + 3
public String buildQueryPaging(String sqlText, int offset, int max)
SqlDialect
buildQueryPaging
in interface SqlDialect
buildQueryPaging
in class AnsiDialect
sqlText
- final SQL with parameters to bindoffset
- number from first row from query resultmax
- maximum number of rows from query result.Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.