java.lang.Object
org.mybatis.dynamic.sql.select.function.Cast
All Implemented Interfaces:
BasicColumn

public class Cast extends Object implements BasicColumn
  • Method Details

    • alias

      public Optional<String> alias()
      Description copied from interface: BasicColumn
      Returns the columns alias if one has been specified.
      Specified by:
      alias in interface BasicColumn
      Returns:
      the column alias
    • as

      public Cast as(String alias)
      Description copied from interface: BasicColumn
      Returns a new instance of a BasicColumn with the alias set.
      Specified by:
      as in interface BasicColumn
      Parameters:
      alias - the column alias to set
      Returns:
      new instance with alias set
    • render

      public FragmentAndParameters render(RenderingContext renderingContext)
      Description copied from interface: BasicColumn
      Returns a rendering of the column. The rendered fragment should include the table alias based on the TableAliasCalculator in the RenderingContext. The fragment could contain prepared statement parameter markers and associated parameter values if desired.
      Specified by:
      render in interface BasicColumn
      Parameters:
      renderingContext - the rendering context (strategy, sequence, etc.)
      Returns:
      a rendered SQL fragment and, optionally, parameters associated with the fragment