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 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
  • 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.