public class CountSqlImpl extends SqlLogImpl implements CountSql, UseAliasSupport, PrepareStatementBuildSupport
Constructor and Description |
---|
CountSqlImpl(Mapper<?> mapper)
构造函数
|
CountSqlImpl(Mapper<?> mapper,
boolean needToInit)
构造函数
|
Modifier and Type | Method and Description |
---|---|
CountSql |
andHaving(CriteriaItem havingItem)
`HAVING AND item`语句
|
CountSql |
andHaving(List<Criteria> havings)
`HAVING AND (havings)`语句
|
CountSql |
andWhere(CriteriaItem item)
`WHERE AND` 语句
|
CountSql |
andWhere(List<Criteria> criterion)
`WHERE AND` 语句
|
CountSql |
column(IColumn column)
`t.column`语句, "t": 为表的别名
|
CountSql |
column(List<? extends IColumn> columns)
`t.column1, t.column2, ...`语句, "t": 为表的别名
|
CountSql |
columnPo(Class<?> poClass)
传入实体类
|
CountSql |
complexFullJoinOn(Table table,
List<CriteriaItem> criteriaItems)
`FULL JOIN table t1 on t1.column1=t0.column2, t1.column3=t0.column4 AND t1.column5=?`语句
|
CountSql |
complexInnerJoinOn(Table table,
List<CriteriaItem> criteriaItems)
`INNER JOIN table t1 on t1.column1=t0.column2, t1.column3=t0.column4 AND t1.column5=?`语句
|
CountSql |
complexLeftJoinOn(Table table,
List<CriteriaItem> criteriaItems)
`LEFT JOIN table t1 on t1.column1=t0.column2, t1.column3=t0.column4 AND t1.column5=?`语句
|
CountSql |
complexRightJoinOn(Table table,
List<CriteriaItem> criteriaItems)
`RIGHT JOIN table t1 on t1.column1=t0.column2, t1.column3=t0.column4 AND t1.column5=?`语句
|
CountSql |
distinct()
distinct 操作
|
CountSql |
distinct(boolean distinct)
distinct 操作
|
int |
executeCount()
计数
|
CountSql |
from(List<Table> tables)
`FROM table1 t1, table2 t2...` 语句, t1, t2表示"表别名"
|
CountSql |
from(Table table)
`FROM table1 t1` 语句, t1表示"表别名"
|
CountSql |
fromDefault()
计算默认的表
|
CountSql |
fullJoinOn(Table table,
List<Column> columnPairs)
`FULL JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
PrepareStatement |
getPrepareStatement()
获取预查询SQL
|
CountSql |
groupBy(Column groupBy)
`GROUP BY t1.column`语句
|
CountSql |
groupBy(List<Column> groupBys)
`GROUP BY t1.column1, t2.column2, ...`语句
|
CountSql |
having(Criteria having)
`HAVING`语句
|
CountSql |
having(List<Criteria> havings)
`HAVING`语句
|
CountSql |
innerJoinOn(Table table,
List<Column> columnPairs)
`INNER JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
boolean |
isUseAlias()
是否使用别名
|
CountSql |
joinOn(JoinOn joinOn)
JoinOn操作
|
CountSql |
joinOn(List<JoinOn> joinOns)
JoinOn操作
|
CountSql |
joinOn(Table table,
List<Column> columnPairs)
`JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
CountSql |
leftJoinOn(Table table,
List<Column> columnPairs)
`LEFT JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
CountSql |
orHaving(CriteriaItem havingItem)
`HAVING OR item`语句
|
CountSql |
orHaving(List<Criteria> havings)
`HAVING OR (havings)`语句(多个OR关系)
|
CountSql |
orWhere(CriteriaItem item)
`WHERE OR`语句
|
CountSql |
orWhere(List<Criteria> criterion)
`WHERE OR`语句
|
CountSql |
rightJoinOn(Table table,
List<Column> columnPairs)
`RIGHT JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
void |
setColumnSupport(ColumnSupportImpl<CountSql> columnSupport)
Sets the columnSupport
|
void |
setDistinctSupport(DistinctSupportImpl<CountSql> distinctSupport)
Sets the distinctSupport
|
void |
setFromSupport(FromSupportImpl<CountSql> fromSupport)
Sets the fromSupport
|
void |
setGroupBySupport(GroupBySupportImpl<CountSql> groupBySupport)
Sets the groupBySupport
|
void |
setHavingSupport(HavingSupportImpl<CountSql> havingSupport)
Sets the havingSupport
|
void |
setJoinOnSupport(JoinOnSupportImpl<CountSql> joinOnSupport)
Sets the joinOnSupport
|
void |
setWhereSupport(WhereSupportImpl<CountSql> whereSupport)
Sets the whereSupport
|
CountSql |
where(Criteria criteria)
`WHERE` 语句
|
CountSql |
where(List<Criteria> criterion)
`WHERE` 语句
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, append, getPrepareStatement, getPrepareStatement, getPrepareStatement, getPrepareStatement
public CountSqlImpl(Mapper<?> mapper)
mapper
- mapperpublic CountSqlImpl(Mapper<?> mapper, boolean needToInit)
mapper
- mapperneedToInit
- 是否初始化public CountSql column(List<? extends IColumn> columns)
ColumnSupport
column
in interface ColumnSupport<CountSql>
columns
- 查询字段对象IColumn
public CountSql column(IColumn column)
ColumnSupport
column
in interface ColumnSupport<CountSql>
column
- 查询字段对象IColumn
public CountSql columnPo(Class<?> poClass)
ColumnSupport
columnPo
in interface ColumnSupport<CountSql>
poClass
- 实体类public CountSql from(Table table)
FromSupport
from
in interface FromSupport<CountSql>
table
- 表对象Table
public CountSql from(List<Table> tables)
FromSupport
from
in interface FromSupport<CountSql>
tables
- 表对象列表Table
public CountSql distinct()
DistinctSupport
distinct
in interface DistinctSupport<CountSql>
public CountSql distinct(boolean distinct)
DistinctSupport
distinct
in interface DistinctSupport<CountSql>
distinct
- 是否distinctpublic CountSql having(Criteria having)
HavingSupport
having
in interface HavingSupport<CountSql>
having
- having语句对象public CountSql having(List<Criteria> havings)
HavingSupport
having
in interface HavingSupport<CountSql>
havings
- having语句对象列表public CountSql andHaving(CriteriaItem havingItem)
HavingSupport
andHaving
in interface HavingSupport<CountSql>
havingItem
- having语句对象public CountSql andHaving(List<Criteria> havings)
HavingSupport
andHaving
in interface HavingSupport<CountSql>
havings
- having语句对象列表public CountSql orHaving(CriteriaItem havingItem)
HavingSupport
orHaving
in interface HavingSupport<CountSql>
havingItem
- having语句对象public CountSql orHaving(List<Criteria> havings)
HavingSupport
orHaving
in interface HavingSupport<CountSql>
havings
- having语句对象列表public CountSql joinOn(JoinOn joinOn)
JoinOnSupport
joinOn
in interface JoinOnSupport<CountSql>
joinOn
- JoinOn操作public CountSql joinOn(List<JoinOn> joinOns)
JoinOnSupport
joinOn
in interface JoinOnSupport<CountSql>
joinOns
- JoinOn操作列表public CountSql joinOn(Table table, List<Column> columnPairs)
JoinOnSupport
joinOn
in interface JoinOnSupport<CountSql>
table
- 需要join的表对象columnPairs
- on相关的"列-对"Column
public CountSql leftJoinOn(Table table, List<Column> columnPairs)
JoinOnSupport
leftJoinOn
in interface JoinOnSupport<CountSql>
table
- 需要join的表对象columnPairs
- DbColumn pairsColumn
public CountSql rightJoinOn(Table table, List<Column> columnPairs)
JoinOnSupport
rightJoinOn
in interface JoinOnSupport<CountSql>
table
- 需要join的表对象columnPairs
- DbColumn pairsColumn
public CountSql fullJoinOn(Table table, List<Column> columnPairs)
JoinOnSupport
fullJoinOn
in interface JoinOnSupport<CountSql>
table
- 需要join的表对象columnPairs
- DbColumn pairsColumn
public CountSql innerJoinOn(Table table, List<Column> columnPairs)
JoinOnSupport
innerJoinOn
in interface JoinOnSupport<CountSql>
table
- 需要join的表对象columnPairs
- DbColumn pairsColumn
public CountSql complexLeftJoinOn(Table table, List<CriteriaItem> criteriaItems)
JoinOnSupport
complexLeftJoinOn
in interface JoinOnSupport<CountSql>
table
- 需要join的表对象criteriaItems
- 条件public CountSql complexRightJoinOn(Table table, List<CriteriaItem> criteriaItems)
JoinOnSupport
complexRightJoinOn
in interface JoinOnSupport<CountSql>
table
- 需要join的表对象criteriaItems
- 条件public CountSql complexFullJoinOn(Table table, List<CriteriaItem> criteriaItems)
JoinOnSupport
complexFullJoinOn
in interface JoinOnSupport<CountSql>
table
- 需要join的表对象criteriaItems
- 条件public CountSql complexInnerJoinOn(Table table, List<CriteriaItem> criteriaItems)
JoinOnSupport
complexInnerJoinOn
in interface JoinOnSupport<CountSql>
table
- 需要join的表对象criteriaItems
- 条件public CountSql where(Criteria criteria)
WhereSupport
where
in interface WhereSupport<CountSql>
criteria
- WHERE相关条件Criteria
public CountSql where(List<Criteria> criterion)
WhereSupport
where
in interface WhereSupport<CountSql>
criterion
- WHERE相关条件列表Criteria
public CountSql andWhere(CriteriaItem item)
WhereSupport
andWhere
in interface WhereSupport<CountSql>
item
- WHERE相关条件Criteria
public CountSql andWhere(List<Criteria> criterion)
WhereSupport
andWhere
in interface WhereSupport<CountSql>
criterion
- WHERE相关条件列表Criteria
public CountSql orWhere(CriteriaItem item)
WhereSupport
orWhere
in interface WhereSupport<CountSql>
item
- WHERE相关条件Criteria
public CountSql orWhere(List<Criteria> criterion)
WhereSupport
orWhere
in interface WhereSupport<CountSql>
criterion
- WHERE相关条件列表Criteria
public CountSql groupBy(Column groupBy)
GroupBySupport
groupBy
in interface GroupBySupport<CountSql>
groupBy
- 相关列aIColumn
public CountSql groupBy(List<Column> groupBys)
GroupBySupport
groupBy
in interface GroupBySupport<CountSql>
groupBys
- 相关列列表IColumn
public boolean isUseAlias()
UseAliasSupport
isUseAlias
in interface UseAliasSupport
public CountSql fromDefault()
CountSql
fromDefault
in interface CountSql
public void setDistinctSupport(DistinctSupportImpl<CountSql> distinctSupport)
You can use getDistinctSupport() to get the value of distinctSupport
distinctSupport
- distinctSupportpublic void setColumnSupport(ColumnSupportImpl<CountSql> columnSupport)
You can use getColumnSupport() to get the value of columnSupport
columnSupport
- columnSupportpublic void setFromSupport(FromSupportImpl<CountSql> fromSupport)
You can use getFromSupport() to get the value of fromSupport
fromSupport
- fromSupportpublic void setJoinOnSupport(JoinOnSupportImpl<CountSql> joinOnSupport)
You can use getJoinOnSupport() to get the value of joinOnSupport
joinOnSupport
- joinOnSupportpublic void setWhereSupport(WhereSupportImpl<CountSql> whereSupport)
You can use getWhereSupport() to get the value of whereSupport
whereSupport
- whereSupportpublic void setGroupBySupport(GroupBySupportImpl<CountSql> groupBySupport)
You can use getGroupBySupport() to get the value of groupBySupport
groupBySupport
- groupBySupportpublic void setHavingSupport(HavingSupportImpl<CountSql> havingSupport)
You can use getHavingSupport() to get the value of havingSupport
havingSupport
- havingSupportpublic PrepareStatement getPrepareStatement()
PrepareStatementSupport
getPrepareStatement
in interface PrepareStatementSupport
public int executeCount()
CountSql
executeCount
in interface CountSql
Copyright © 2020 IBIT程序猿. All rights reserved.