Package org.mybatis.dynamic.sql.select
Class CountDSL<R>
- java.lang.Object
-
- org.mybatis.dynamic.sql.where.AbstractWhereSupport<W>
-
- org.mybatis.dynamic.sql.select.AbstractQueryExpressionDSL<CountDSL.CountWhereBuilder,CountDSL<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.CountWhereBuilder,CountDSL<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>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
Methods inherited from class org.mybatis.dynamic.sql.select.AbstractQueryExpressionDSL
addJoinSpecificationBuilder, addTableAlias, buildJoinModel, buildSubQuery, buildSubQuery, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, join, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, table, tableAliases
-
Methods inherited from class org.mybatis.dynamic.sql.where.AbstractWhereSupport
applyWhere, where, where, where, where, where, where
-
-
-
-
Method Detail
-
where
public CountDSL.CountWhereBuilder where()
- Specified by:
where
in classAbstractWhereSupport<CountDSL.CountWhereBuilder>
-
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)
-
getThis
protected CountDSL<R> getThis()
- Specified by:
getThis
in classAbstractQueryExpressionDSL<CountDSL.CountWhereBuilder,CountDSL<R>>
-
-