| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final int | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | bindLimitParametersFirst()
Overrides org. |
| public int | convertToFirstRowValue(int
The user-supplied, zero-based first row offset. zeroBasedFirstResult)Overrides org. |
| public String | getLimitString(String
The query to which to apply the limit. query, int The offset of the limit offset, int The limit of the limit ;) limit)Overrides org. |
| public String | Returns: A new SQL statement with the LIMIT clause applied.The SQL statement to base the limit query off of. querySqlString, boolean Offset of the first row to be returned by the query (zero-based) hasOffset)Overrides org. WITH query AS ( SELECT ROW_NUMBER() OVER (ORDER BY orderby) as __hibernate_row_nr__, original_query_without_orderby ) SELECT * FROM query WHERE __hibernate_row_nr__ BEETWIN offset AND offset + last |
| protected static CharSequence | Returns: the fields of the select statement without their aliassql query sql)This utility method searches the given sql query for the fields of the select statement and returns them without the aliases. |
| protected static void | insertRowNumberFunction(StringBuilder
the initial sql query without the order by clause sql, CharSequence the order by clause of the query orderby)Right after the select statement of a given query we must place the row_number function |
| protected static void | replaceDistinctWithGroupBy(StringBuilder
an sql query sql)Utility method that checks if the given sql query is a select distinct one and if so replaces the distinct select with an equivalent simple select with a group by clause. |
| protected static String | Returns: a string without the as statementsstring to replace the as statements str)Utility method that strips the aliases. |
| public boolean | supportsLimitOffset()
Overrides org. |
| public boolean | supportsVariableLimit()
Overrides org. |
| DISTINCT | back to summary |
|---|---|
| private static final String DISTINCT | |
| FROM | back to summary |
|---|---|
| private static final String FROM | |
| MAX_LENGTH | back to summary |
|---|---|
| private static final int MAX_LENGTH | |
| SELECT | back to summary |
|---|---|
| private static final String SELECT | |
| SQLServer2005Dialect | back to summary |
|---|---|
| public SQLServer2005Dialect() | |
| bindLimitParametersFirst | back to summary |
|---|---|
| public boolean bindLimitParametersFirst() Overrides org. Doc from org. Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
| |
| convertToFirstRowValue | back to summary |
|---|---|
| public int convertToFirstRowValue(int zeroBasedFirstResult) Overrides org. Doc from org. Hibernate APIs explicitly state that setFirstResult() should be a zero-based offset. Here we allow the Dialect a chance to convert that value based on what the underlying db or driver will expect. Note what gets passed into
| |
| getLimitString | back to summary |
|---|---|
| public String getLimitString(String query, int offset, int limit) Overrides org. Doc from org. Given a limit and an offset, apply the limit clause to the query. | |
| getLimitString | back to summary |
|---|---|
| public String getLimitString(String querySqlString, boolean hasOffset) Overrides org. Add a LIMIT clause to the given SQL SELECT (HHH-2655: ROW_NUMBER for Paging) The LIMIT SQL will look like: WITH query AS ( SELECT ROW_NUMBER() OVER (ORDER BY orderby) as __hibernate_row_nr__, original_query_without_orderby ) SELECT * FROM query WHERE __hibernate_row_nr__ BEETWIN offset AND offset + last | |
| getSelectFieldsWithoutAliases | back to summary |
|---|---|
| protected static CharSequence getSelectFieldsWithoutAliases(StringBuilder sql) This utility method searches the given sql query for the fields of the select statement and returns them without
the aliases. See
| |
| insertRowNumberFunction | back to summary |
|---|---|
| protected static void insertRowNumberFunction(StringBuilder sql, CharSequence orderby) Right after the select statement of a given query we must place the row_number function
| |
| replaceDistinctWithGroupBy | back to summary |
|---|---|
| protected static void replaceDistinctWithGroupBy(StringBuilder sql) Utility method that checks if the given sql query is a select distinct one and if so replaces the distinct select
with an equivalent simple select with a group by clause. See
| |
| stripAliases | back to summary |
|---|---|
| protected static String stripAliases(String str) Utility method that strips the aliases. See | |
| supportsLimitOffset | back to summary |
|---|---|
| public boolean supportsLimitOffset() Overrides org. Doc from org. Does this dialect's LIMIT support (if any) additionally support specifying an offset?
| |
| supportsVariableLimit | back to summary |
|---|---|
| public boolean supportsVariableLimit() Overrides org. Doc from org. Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?
| |