public class DB2EnableORADialect extends AnsiDialect
Limit clause:
SELECT TEXT FROM SESSION.SEARCHRESULTS
WHERE ROWNUM BETWEEN 20 AND 40
ORDER BY ID
The DB2_COMPATIBILITY_VECTOR registry variable enables one or more DB2® compatibility features. These features ease the task of migrating applications that were written for relational database products other than the DB2 product to DB2 Version 9.5 or later.
This registry variable is supported on Linux, UNIX, and Windows operating systems. You can enable individual DB2 compatibility features by specify a hexadecimal value for the registry variable. Each bit in the variable value enables a different feature. Values are as follows:
NULL (default) 0000 - FFFF ORA, to take full advantage of the DB2 compatibility features for Oracle applications SYB, to take full advantage of the DB2 compatibility features for Sybase applications MYS, to take full advantage of the DB2 compatibility features for MySQL applications
name, patternORDER_BY
Constructor and Description |
---|
DB2EnableORADialect() |
Modifier and Type | Method and Description |
---|---|
String |
buildQueryPaging(String sqlText,
int offset,
int max)
Build a paginate query accordingly data base dialect
|
String |
getSqlPatternPaging()
Using rownum to paging the select, COMPATIBILITY_VECTOR=ORA must be enabled.
|
addFeature, buildQueryCount, buildQueryPaging, countOccurrencesOf, getAccessId, getAccessRevision, getMaxOfParameters, getSqlPatternCount, name, setMaxOfParameters, sqlEndsWithOrderBy, sqlEndWithForUpdate, sqlStartWithSelect, sqlStartWithSelectOrDistinct, supportsFeature, supportsParmMark
public DB2EnableORADialect()
public String getSqlPatternPaging()
getSqlPatternPaging
in interface SqlDialect
getSqlPatternPaging
in class AnsiDialect
select * from (%1$s) where rownum between %3$s and %2$s
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.