Class SqlServerSelectRenderContext
java.lang.Object
org.springframework.data.relational.core.dialect.SqlServerSelectRenderContext
- All Implemented Interfaces:
SelectRenderContext
SQL-Server specific
SelectRenderContext
. Summary of SQL-specifics:
- Appends a synthetic ROW_NUMBER when using pagination and the query does not specify ordering
- Append synthetic ordering if query uses pagination and the query does not specify ordering
- Author:
- Mark Paluch, Myeonghyeon Lee
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SqlServerSelectRenderContext
(Function<Select, CharSequence> afterFromTable, Function<Select, CharSequence> afterOrderBy) Creates a newSqlServerSelectRenderContext
. -
Method Summary
Modifier and TypeMethodDescriptionFunction<Select,
? extends CharSequence> Customization hook: Rendition of a part afterFROM
table.Function<Select,
? extends CharSequence> afterOrderBy
(boolean hasOrderBy) Customization hook: Rendition of a part afterORDER BY
.Function<Select,
? extends CharSequence> Customization hook: Rendition of a part after theSELECT
list and before anyFROM
renderings.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.relational.core.sql.render.SelectRenderContext
evaluateOrderByNullHandling
-
Constructor Details
-
SqlServerSelectRenderContext
protected SqlServerSelectRenderContext(Function<Select, CharSequence> afterFromTable, Function<Select, CharSequence> afterOrderBy) Creates a newSqlServerSelectRenderContext
.- Parameters:
afterFromTable
- the delegateafterFromTable
function.afterOrderBy
- the delegateafterOrderBy
function.
-
-
Method Details
-
afterSelectList
Description copied from interface:SelectRenderContext
Customization hook: Rendition of a part after theSELECT
list and before anyFROM
renderings. Renders an empty string by default.- Specified by:
afterSelectList
in interfaceSelectRenderContext
- Returns:
- render
Function
invoked after renderingSELECT
list.
-
afterFromTable
Description copied from interface:SelectRenderContext
Customization hook: Rendition of a part afterFROM
table. Renders an empty string by default.- Specified by:
afterFromTable
in interfaceSelectRenderContext
- Returns:
- render
Function
invoked after renderingFROM
table.
-
afterOrderBy
Description copied from interface:SelectRenderContext
Customization hook: Rendition of a part afterORDER BY
. The rendering function is called always, regardless whetherORDER BY
exists or not.Renders lock, limit and offset clause as appropriate.
- Specified by:
afterOrderBy
in interfaceSelectRenderContext
- Parameters:
hasOrderBy
- the actual value whether theSelect
statement has aORDER BY
clause.- Returns:
- render
Function
invoked after renderingORDER BY
.
-