Class AbstractCount

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

public abstract class AbstractCount extends Object implements BindableColumn<Long>
Count functions are implemented differently than the other aggregates. This is primarily to preserve backwards compatibility. Count functions are configured as BindableColumns of type Long as it is assumed that the count functions always return a number.
  • Constructor Details

    • AbstractCount

      protected AbstractCount()
    • AbstractCount

      protected AbstractCount(String alias)
  • 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