Interface SelectRenderContext

All Known Implementing Classes:
SqlServerSelectRenderContext

public interface SelectRenderContext
Render context specifically for SELECT statements. This interface declares rendering hooks that are called before/after/during a specific SELECT clause part. The rendering content is appended directly after/before an element without further whitespace processing. Hooks are responsible for adding required surrounding whitespaces.
Since:
1.1
Author:
Mark Paluch, Myeonghyeon Lee, Jens Schauder, Chirag Tailor
  • Method Details

    • afterSelectList

      default Function<Select,? extends CharSequence> afterSelectList()
      Customization hook: Rendition of a part after the SELECT list and before any FROM renderings. Renders an empty string by default.
      Returns:
      render Function invoked after rendering SELECT list.
    • afterFromTable

      default Function<Select,? extends CharSequence> afterFromTable()
      Customization hook: Rendition of a part after FROM table. Renders an empty string by default.
      Returns:
      render Function invoked after rendering FROM table.
    • afterOrderBy

      default Function<Select,? extends CharSequence> afterOrderBy(boolean hasOrderBy)
      Customization hook: Rendition of a part after ORDER BY. The rendering function is called always, regardless whether ORDER BY exists or not.

      Renders lock, limit and offset clause as appropriate.

      Parameters:
      hasOrderBy - the actual value whether the Select statement has a ORDER BY clause.
      Returns:
      render Function invoked after rendering ORDER BY.
    • evaluateOrderByNullHandling

      default String evaluateOrderByNullHandling(Sort.NullHandling nullHandling)
      Customization hook: Rendition of the null handling option for an ORDER BY sort expression.
      Parameters:
      nullHandling - the Sort.NullHandling for the ORDER BY sort expression. Must not be null.
      Returns:
      render String SQL text to be included in an ORDER BY sort expression.
      Since:
      2.4