Package org.mybatis.dynamic.sql.select
Class CountDSL<R>
java.lang.Object
org.mybatis.dynamic.sql.where.AbstractWhereStarter<CountDSL<R>.CountWhereBuilder,CountDSL<R>>
org.mybatis.dynamic.sql.select.AbstractQueryExpressionDSL<CountDSL<R>.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>
,ConfigurableStatement<CountDSL<R>>
public class CountDSL<R>
extends AbstractQueryExpressionDSL<CountDSL<R>.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
Modifier and TypeClassDescriptionclass
static class
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
configureStatement
(Consumer<StatementConfiguration> consumer) 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> getThis()
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.AbstractWhereStarter
applyWhere, where, where, where, where, where, where, where
-
Method Details
-
where
- Specified by:
where
in classAbstractWhereStarter<CountDSL<R>.CountWhereBuilder,
CountDSL<R>>
-
build
-
configureStatement
- Specified by:
configureStatement
in interfaceConfigurableStatement<R>
-
countFrom
-
countFrom
-
count
-
count
public static <R> CountDSL.FromGatherer<R> count(Function<SelectModel, R> adapterFunction, BasicColumn column) -
countDistinct
-
countDistinct
public static <R> CountDSL.FromGatherer<R> countDistinct(Function<SelectModel, R> adapterFunction, BasicColumn column) -
getThis
- Specified by:
getThis
in classAbstractQueryExpressionDSL<CountDSL<R>.CountWhereBuilder,
CountDSL<R>>
-