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
ConstructorsModifierConstructorDescriptionprotectedSqlServerSelectRenderContext(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 afterFROMtable.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 theSELECTlist and before anyFROMrenderings.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 delegateafterFromTablefunction.afterOrderBy- the delegateafterOrderByfunction.
-
-
Method Details
-
afterSelectList
Description copied from interface:SelectRenderContextCustomization hook: Rendition of a part after theSELECTlist and before anyFROMrenderings. Renders an empty string by default.- Specified by:
afterSelectListin interfaceSelectRenderContext- Returns:
- render
Functioninvoked after renderingSELECTlist.
-
afterFromTable
Description copied from interface:SelectRenderContextCustomization hook: Rendition of a part afterFROMtable. Renders an empty string by default.- Specified by:
afterFromTablein interfaceSelectRenderContext- Returns:
- render
Functioninvoked after renderingFROMtable.
-
afterOrderBy
Description copied from interface:SelectRenderContextCustomization hook: Rendition of a part afterORDER BY. The rendering function is called always, regardless whetherORDER BYexists or not.Renders lock, limit and offset clause as appropriate.
- Specified by:
afterOrderByin interfaceSelectRenderContext- Parameters:
hasOrderBy- the actual value whether theSelectstatement has aORDER BYclause.- Returns:
- render
Functioninvoked after renderingORDER BY.
-