Class CountDistinct

java.lang.Object
org.mybatis.dynamic.sql.select.aggregate.AbstractCount
org.mybatis.dynamic.sql.select.aggregate.CountDistinct
All Implemented Interfaces:
BasicColumn, BindableColumn<Long>

public class CountDistinct extends AbstractCount
  • Method Details

    • 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.
      Parameters:
      renderingContext - the rendering context (strategy, sequence, etc.)
      Returns:
      a rendered SQL fragment and, optionally, parameters associated with the fragment
    • as

      public CountDistinct as(String alias)
      Description copied from interface: BindableColumn
      Override the base method definition to make it more specific to this interface.
      Parameters:
      alias - the column alias to set
      Returns:
      new instance with alias set
    • of

      public static CountDistinct of(BasicColumn column)