java.lang.Object
org.springframework.data.relational.core.sql.render.SqlRenderer
All Implemented Interfaces:
Renderer

public class SqlRenderer extends Object implements Renderer
SQL renderer for Select and Delete statements.
Since:
1.1
Author:
Mark Paluch, Jens Schauder
See Also:
  • Method Details

    • create

      public static SqlRenderer create()
      Creates a new SqlRenderer.
      Returns:
      the renderer.
    • create

      public static SqlRenderer create(RenderContext context)
      Creates a new SqlRenderer using a RenderContext.
      Parameters:
      context - must not be null.
      Returns:
      the renderer.
    • toString

      public static String toString(Select select)
      Renders a Select statement into its SQL representation.
      Parameters:
      select - must not be null.
      Returns:
      the rendered statement.
    • toString

      public static String toString(Insert insert)
      Renders a Insert statement into its SQL representation.
      Parameters:
      insert - must not be null.
      Returns:
      the rendered statement.
    • toString

      public static String toString(Update update)
      Renders a Update statement into its SQL representation.
      Parameters:
      update - must not be null.
      Returns:
      the rendered statement.
    • toString

      public static String toString(Delete delete)
      Renders a Delete statement into its SQL representation.
      Parameters:
      delete - must not be null.
      Returns:
      the rendered statement.
    • render

      public String render(Select select)
      Render the Select AST into a SQL statement.
      Specified by:
      render in interface Renderer
      Parameters:
      select - the statement to render, must not be null.
      Returns:
      the rendered statement.
    • render

      public String render(Insert insert)
      Render the Insert AST into a SQL statement.
      Specified by:
      render in interface Renderer
      Parameters:
      insert - the statement to render, must not be null.
      Returns:
      the rendered statement.
    • render

      public String render(Update update)
      Render the Update AST into a SQL statement.
      Specified by:
      render in interface Renderer
      Parameters:
      update - the statement to render, must not be null.
      Returns:
      the rendered statement.
    • render

      public String render(Delete delete)
      Render the Delete AST into a SQL statement.
      Specified by:
      render in interface Renderer
      Parameters:
      delete - the statement to render, must not be null.
      Returns:
      the rendered statement.