- java.lang.Object
-
- org.mybatis.dynamic.sql.select.AbstractQueryExpressionDSL<CountDSL<R>,R>
-
- org.mybatis.dynamic.sql.select.CountDSL<R>
-
- Type Parameters:
R
- the type of model built by this Builder. Typically SelectModel.
- All Implemented Interfaces:
Buildable<R>
public class CountDSL<R> extends AbstractQueryExpressionDSL<CountDSL<R>,R> implements Buildable<R>
DSL for building count queries. Count queries are specializations of select queries. They have joins and where clauses, but not the other parts of a select (group by, order by, etc.) Count queries always return a long. If these restrictions are not acceptable, then use the Select DSL for an unrestricted select statement.- Author:
- Jeff Butler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CountDSL.CountWhereBuilder
static class
CountDSL.FromGatherer<R>
-
Field Summary
-
Fields inherited from class org.mybatis.dynamic.sql.select.AbstractQueryExpressionDSL
tableAliases
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CountDSL.CountWhereBuilder
applyWhere(WhereApplier whereApplier)
R
build()
static <R> CountDSL.FromGatherer<R>
count(Function<SelectModel,R> adapterFunction, BasicColumn column)
static CountDSL.FromGatherer<SelectModel>
count(BasicColumn column)
static <R> CountDSL.FromGatherer<R>
countDistinct(Function<SelectModel,R> adapterFunction, BasicColumn column)
static CountDSL.FromGatherer<SelectModel>
countDistinct(BasicColumn column)
static <R> CountDSL<R>
countFrom(Function<SelectModel,R> adapterFunction, SqlTable table)
static CountDSL<SelectModel>
countFrom(SqlTable table)
protected CountDSL<R>
getThis()
CountDSL.CountWhereBuilder
where()
<T> CountDSL.CountWhereBuilder
where(BindableColumn<T> column, VisitableCondition<T> condition, SqlCriterion<?>... subCriteria)
-
-
-
Method Detail
-
where
public CountDSL.CountWhereBuilder where()
-
where
public <T> CountDSL.CountWhereBuilder where(BindableColumn<T> column, VisitableCondition<T> condition, SqlCriterion<?>... subCriteria)
-
applyWhere
public CountDSL.CountWhereBuilder applyWhere(WhereApplier whereApplier)
-
countFrom
public static CountDSL<SelectModel> countFrom(SqlTable table)
-
countFrom
public static <R> CountDSL<R> countFrom(Function<SelectModel,R> adapterFunction, SqlTable table)
-
count
public static CountDSL.FromGatherer<SelectModel> count(BasicColumn column)
-
count
public static <R> CountDSL.FromGatherer<R> count(Function<SelectModel,R> adapterFunction, BasicColumn column)
-
countDistinct
public static CountDSL.FromGatherer<SelectModel> countDistinct(BasicColumn column)
-
countDistinct
public static <R> CountDSL.FromGatherer<R> countDistinct(Function<SelectModel,R> adapterFunction, BasicColumn column)
-
-