public class QuerySqlImpl<T> extends SqlLogImpl implements QuerySql<T>, UseAliasSupport, PrepareStatementBuildSupport
| Constructor and Description |
|---|
QuerySqlImpl(Mapper<T> mapper) |
| Modifier and Type | Method and Description |
|---|---|
QuerySql<T> |
andHaving(CriteriaItem havingItem)
`HAVING AND item`语句
|
QuerySql<T> |
andHaving(List<Criteria> havings)
`HAVING AND (havings)`语句
|
QuerySql<T> |
andWhere(CriteriaItem item)
`WHERE AND` 语句
|
QuerySql<T> |
andWhere(List<Criteria> criterion)
`WHERE AND` 语句
|
QuerySql<T> |
column(IColumn column)
`t.column`语句, "t": 为表的别名
|
QuerySql<T> |
column(List<? extends IColumn> columns)
`t.column1, t.column2, ...`语句, "t": 为表的别名
|
QuerySql<T> |
columnDefaultPo()
定义搜索列(从mapper getPoClazz中获取)
|
QuerySql<T> |
columnPo(Class<?> poClass)
传入实体类
|
QuerySql<T> |
complexFullJoinOn(Table table,
List<CriteriaItem> criteriaItems)
`FULL JOIN table t1 on t1.column1=t0.column2, t1.column3=t0.column4 AND t1.column5=?`语句
|
QuerySql<T> |
complexInnerJoinOn(Table table,
List<CriteriaItem> criteriaItems)
`INNER JOIN table t1 on t1.column1=t0.column2, t1.column3=t0.column4 AND t1.column5=?`语句
|
QuerySql<T> |
complexLeftJoinOn(Table table,
List<CriteriaItem> criteriaItems)
`LEFT JOIN table t1 on t1.column1=t0.column2, t1.column3=t0.column4 AND t1.column5=?`语句
|
QuerySql<T> |
complexRightJoinOn(Table table,
List<CriteriaItem> criteriaItems)
`RIGHT JOIN table t1 on t1.column1=t0.column2, t1.column3=t0.column4 AND t1.column5=?`语句
|
QuerySql<T> |
distinct()
distinct 操作
|
QuerySql<T> |
distinct(boolean distinct)
distinct 操作
|
List<T> |
executeQuery()
查询
|
<P> List<P> |
executeQuery(Class<P> clazz)
查询
|
<V> List<V> |
executeQueryDefault()
查询基本类型
|
<V> Page<V> |
executeQueryDefaultPage()
查询基本类型(包含分页信息)
|
T |
executeQueryOne()
查询单个对象
|
<P> P |
executeQueryOne(Class<P> clazz)
查询单个对象
|
Page<T> |
executeQueryPage()
查询(包含分页信息)
|
<P> Page<P> |
executeQueryPage(Class<P> clazz)
查询(包含分页信息)
|
QuerySql<T> |
from(List<Table> tables)
`FROM table1 t1, table2 t2...` 语句, t1, t2表示"表别名"
|
QuerySql<T> |
from(Table table)
`FROM table1 t1` 语句, t1表示"表别名"
|
QuerySql<T> |
fromDefault()
定义搜索定义搜索表(从 mapper getDefaultTable 中获取)
|
QuerySql<T> |
fullJoinOn(Table table,
List<Column> columnPairs)
`FULL JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
PrepareStatement |
getPrepareStatement()
获取预查询SQL
|
QuerySql<T> |
groupBy(Column groupBy)
`GROUP BY t1.column`语句
|
QuerySql<T> |
groupBy(List<Column> groupBys)
`GROUP BY t1.column1, t2.column2, ...`语句
|
QuerySql<T> |
having(Criteria having)
`HAVING`语句
|
QuerySql<T> |
having(List<Criteria> havings)
`HAVING`语句
|
QuerySql<T> |
innerJoinOn(Table table,
List<Column> columnPairs)
`INNER JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
boolean |
isUseAlias()
是否使用别名
|
QuerySql<T> |
joinOn(JoinOn joinOn)
JoinOn操作
|
QuerySql<T> |
joinOn(List<JoinOn> joinOns)
JoinOn操作
|
QuerySql<T> |
joinOn(Table table,
List<Column> columnPairs)
`JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
QuerySql<T> |
leftJoinOn(Table table,
List<Column> columnPairs)
`LEFT JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
QuerySql<T> |
limit(int limit)
`LIMIT 0, #{limit}` 语句
|
QuerySql<T> |
limit(int start,
int limit)
`LIMIT #{start}, #{limit}` 语句
|
QuerySql<T> |
orderBy(IColumn column)
`ORDER BY` 语句
|
QuerySql<T> |
orderBy(IColumn column,
boolean desc)
`ORDER BY` 语句
|
QuerySql<T> |
orderBy(IOrderBy orderBy)
`ORDER BY` 语句
|
QuerySql<T> |
orderBy(List<IOrderBy> orderBys)
`ORDER BY` 语句
|
QuerySql<T> |
orHaving(CriteriaItem havingItem)
`HAVING OR item`语句
|
QuerySql<T> |
orHaving(List<Criteria> havings)
`HAVING OR (havings)`语句(多个OR关系)
|
QuerySql<T> |
orWhere(CriteriaItem item)
`WHERE OR`语句
|
QuerySql<T> |
orWhere(List<Criteria> criterion)
`WHERE OR`语句
|
QuerySql<T> |
rightJoinOn(Table table,
List<Column> columnPairs)
`RIGHT JOIN table t1 ON t1.column1=t0.column2, t1.column3=t0.column4`语句
|
CountSql |
toCountSql()
转换为 CountSql
|
QuerySql<T> |
where(Criteria criteria)
`WHERE` 语句
|
QuerySql<T> |
where(List<Criteria> criterion)
`WHERE` 语句
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappend, append, getPrepareStatement, getPrepareStatement, getPrepareStatement, getPrepareStatementpublic QuerySql<T> column(List<? extends IColumn> columns)
ColumnSupportcolumn in interface ColumnSupport<QuerySql<T>>columns - 查询字段对象IColumnpublic QuerySql<T> column(IColumn column)
ColumnSupportcolumn in interface ColumnSupport<QuerySql<T>>column - 查询字段对象IColumnpublic QuerySql<T> columnPo(Class<?> poClass)
ColumnSupportcolumnPo in interface ColumnSupport<QuerySql<T>>poClass - 实体类public QuerySql<T> from(Table table)
FromSupportfrom in interface FromSupport<QuerySql<T>>table - 表对象Tablepublic QuerySql<T> from(List<Table> tables)
FromSupportfrom in interface FromSupport<QuerySql<T>>tables - 表对象列表Tablepublic QuerySql<T> distinct()
DistinctSupportdistinct in interface DistinctSupport<QuerySql<T>>public QuerySql<T> distinct(boolean distinct)
DistinctSupportdistinct in interface DistinctSupport<QuerySql<T>>distinct - 是否distinctpublic QuerySql<T> having(Criteria having)
HavingSupporthaving in interface HavingSupport<QuerySql<T>>having - having语句对象public QuerySql<T> having(List<Criteria> havings)
HavingSupporthaving in interface HavingSupport<QuerySql<T>>havings - having语句对象列表public QuerySql<T> andHaving(CriteriaItem havingItem)
HavingSupportandHaving in interface HavingSupport<QuerySql<T>>havingItem - having语句对象public QuerySql<T> andHaving(List<Criteria> havings)
HavingSupportandHaving in interface HavingSupport<QuerySql<T>>havings - having语句对象列表public QuerySql<T> orHaving(CriteriaItem havingItem)
HavingSupportorHaving in interface HavingSupport<QuerySql<T>>havingItem - having语句对象public QuerySql<T> orHaving(List<Criteria> havings)
HavingSupportorHaving in interface HavingSupport<QuerySql<T>>havings - having语句对象列表public QuerySql<T> joinOn(JoinOn joinOn)
JoinOnSupportjoinOn in interface JoinOnSupport<QuerySql<T>>joinOn - JoinOn操作public QuerySql<T> joinOn(List<JoinOn> joinOns)
JoinOnSupportjoinOn in interface JoinOnSupport<QuerySql<T>>joinOns - JoinOn操作列表public QuerySql<T> joinOn(Table table, List<Column> columnPairs)
JoinOnSupportjoinOn in interface JoinOnSupport<QuerySql<T>>table - 需要join的表对象columnPairs - on相关的"列-对"Columnpublic QuerySql<T> leftJoinOn(Table table, List<Column> columnPairs)
JoinOnSupportleftJoinOn in interface JoinOnSupport<QuerySql<T>>table - 需要join的表对象columnPairs - DbColumn pairsColumnpublic QuerySql<T> rightJoinOn(Table table, List<Column> columnPairs)
JoinOnSupportrightJoinOn in interface JoinOnSupport<QuerySql<T>>table - 需要join的表对象columnPairs - DbColumn pairsColumnpublic QuerySql<T> fullJoinOn(Table table, List<Column> columnPairs)
JoinOnSupportfullJoinOn in interface JoinOnSupport<QuerySql<T>>table - 需要join的表对象columnPairs - DbColumn pairsColumnpublic QuerySql<T> innerJoinOn(Table table, List<Column> columnPairs)
JoinOnSupportinnerJoinOn in interface JoinOnSupport<QuerySql<T>>table - 需要join的表对象columnPairs - DbColumn pairsColumnpublic QuerySql<T> complexLeftJoinOn(Table table, List<CriteriaItem> criteriaItems)
JoinOnSupportcomplexLeftJoinOn in interface JoinOnSupport<QuerySql<T>>table - 需要join的表对象criteriaItems - 条件public QuerySql<T> complexRightJoinOn(Table table, List<CriteriaItem> criteriaItems)
JoinOnSupportcomplexRightJoinOn in interface JoinOnSupport<QuerySql<T>>table - 需要join的表对象criteriaItems - 条件public QuerySql<T> complexFullJoinOn(Table table, List<CriteriaItem> criteriaItems)
JoinOnSupportcomplexFullJoinOn in interface JoinOnSupport<QuerySql<T>>table - 需要join的表对象criteriaItems - 条件public QuerySql<T> complexInnerJoinOn(Table table, List<CriteriaItem> criteriaItems)
JoinOnSupportcomplexInnerJoinOn in interface JoinOnSupport<QuerySql<T>>table - 需要join的表对象criteriaItems - 条件public QuerySql<T> where(Criteria criteria)
WhereSupportwhere in interface WhereSupport<QuerySql<T>>criteria - WHERE相关条件Criteriapublic QuerySql<T> where(List<Criteria> criterion)
WhereSupportwhere in interface WhereSupport<QuerySql<T>>criterion - WHERE相关条件列表Criteriapublic QuerySql<T> andWhere(CriteriaItem item)
WhereSupportandWhere in interface WhereSupport<QuerySql<T>>item - WHERE相关条件Criteriapublic QuerySql<T> andWhere(List<Criteria> criterion)
WhereSupportandWhere in interface WhereSupport<QuerySql<T>>criterion - WHERE相关条件列表Criteriapublic QuerySql<T> orWhere(CriteriaItem item)
WhereSupportorWhere in interface WhereSupport<QuerySql<T>>item - WHERE相关条件Criteriapublic QuerySql<T> orWhere(List<Criteria> criterion)
WhereSupportorWhere in interface WhereSupport<QuerySql<T>>criterion - WHERE相关条件列表Criteriapublic QuerySql<T> groupBy(Column groupBy)
GroupBySupportgroupBy in interface GroupBySupport<QuerySql<T>>groupBy - 相关列aIColumnpublic QuerySql<T> groupBy(List<Column> groupBys)
GroupBySupportgroupBy in interface GroupBySupport<QuerySql<T>>groupBys - 相关列列表IColumnpublic QuerySql<T> orderBy(IOrderBy orderBy)
OrderBySupportorderBy in interface OrderBySupport<QuerySql<T>>orderBy - 相关orderByIOrderBypublic QuerySql<T> orderBy(List<IOrderBy> orderBys)
OrderBySupportorderBy in interface OrderBySupport<QuerySql<T>>orderBys - 相关orderBy列表IOrderBypublic QuerySql<T> orderBy(IColumn column)
OrderBySupportorderBy in interface OrderBySupport<QuerySql<T>>column - orderBy列public QuerySql<T> orderBy(IColumn column, boolean desc)
OrderBySupportorderBy in interface OrderBySupport<QuerySql<T>>column - orderBy列desc - 是否倒序public QuerySql<T> limit(int start, int limit)
LimitSupportlimit in interface LimitSupport<QuerySql<T>>start - 开始位置limit - 限制条数public QuerySql<T> limit(int limit)
LimitSupportlimit in interface LimitSupport<QuerySql<T>>limit - 限制条数public boolean isUseAlias()
UseAliasSupportisUseAlias in interface UseAliasSupportpublic PrepareStatement getPrepareStatement()
PrepareStatementSupportgetPrepareStatement in interface PrepareStatementSupportpublic CountSql toCountSql()
QuerySqltoCountSql in interface QuerySql<T>public Page<T> executeQueryPage()
QuerySqlexecuteQueryPage in interface QuerySql<T>public <P> Page<P> executeQueryPage(Class<P> clazz)
QuerySqlexecuteQueryPage in interface QuerySql<T>P - 返回类型模板clazz - 返回类型public List<T> executeQuery()
QuerySqlexecuteQuery in interface QuerySql<T>public <P> List<P> executeQuery(Class<P> clazz)
QuerySqlexecuteQuery in interface QuerySql<T>P - 返回类型模板clazz - 返回类型public T executeQueryOne()
QuerySqlexecuteQueryOne in interface QuerySql<T>public <P> P executeQueryOne(Class<P> clazz)
QuerySqlexecuteQueryOne in interface QuerySql<T>P - 返回类型模板clazz - 返回类型public <V> Page<V> executeQueryDefaultPage()
QuerySqlexecuteQueryDefaultPage in interface QuerySql<T>V - 基本类型public <V> List<V> executeQueryDefault()
QuerySqlexecuteQueryDefault in interface QuerySql<T>V - 基本类型public QuerySql<T> columnDefaultPo()
QuerySqlcolumnDefaultPo in interface QuerySql<T>Copyright © 2020 IBIT程序猿. All rights reserved.