org.springframework.data.relational.core.dialect

## Class SqlServerSelectRenderContext

- java.lang.Object
- - org.springframework.data.relational.core.dialect.SqlServerSelectRenderContext

All Implemented Interfaces:
  SelectRenderContext

    public class SqlServerSelectRenderContext
    extends Object
    implements 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

Constructors
`protected` `SqlServerSelectRenderContext(Function<Select,CharSequence> afterFromTable, Function<Select,CharSequence> afterOrderBy)` Creates a new `SqlServerSelectRenderContext`.

### Method Summary

All Methods Instance Methods Concrete Methods
`Function<Select,? extends CharSequence>` `afterFromTable()` Customization hook: Rendition of a part after `FROM` table.
`Function<Select,? extends CharSequence>` `afterOrderBy(boolean hasOrderBy)` Customization hook: Rendition of a part after `ORDER BY`.
`Function<Select,? extends CharSequence>` `afterSelectList()` Customization hook: Rendition of a part after the `SELECT` list and before any `FROM` renderings.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SqlServerSelectRenderContext

    protected SqlServerSelectRenderContext(Function<Select,CharSequence> afterFromTable,
                                           Function<Select,CharSequence> afterOrderBy)

Creates a new `SqlServerSelectRenderContext`.

Parameters:
  `afterFromTable` - the delegate `afterFromTable` function.
  `afterOrderBy` - the delegate `afterOrderBy` function.

### Method Detail

#### afterSelectList

    public Function<Select,? extends CharSequence> afterSelectList()

Description copied from interface: `SelectRenderContext`
Customization hook: Rendition of a part after the `SELECT` list and before any `FROM` renderings. Renders an empty string by default.

Specified by:
  `afterSelectList` in interface `SelectRenderContext`
Returns:
  render `Function` invoked after rendering `SELECT` list.

#### afterFromTable

    public Function<Select,? extends CharSequence> afterFromTable()

Description copied from interface: `SelectRenderContext`
Customization hook: Rendition of a part after `FROM` table. Renders an empty string by default.

Specified by:
  `afterFromTable` in interface `SelectRenderContext`
Returns:
  render `Function` invoked after rendering `FROM` table.

#### afterOrderBy

    public Function<Select,? extends CharSequence> afterOrderBy(boolean hasOrderBy)

Description copied from interface: `SelectRenderContext`
Customization hook: Rendition of a part after `ORDER BY`. The rendering function is called always, regardless whether `ORDER BY` exists or not. Renders an empty string by default.

Specified by:
  `afterOrderBy` in interface `SelectRenderContext`
Parameters:
  `hasOrderBy` - the actual value whether the `Select` statement has a `ORDER BY` clause.
Returns:
  render `Function` invoked after rendering `ORDER BY`.