public class TableInfoExt extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private com.baomidou.mybatisplus.core.metadata.TableInfo |
tableInfo |
| 构造器和说明 |
|---|
TableInfoExt(com.baomidou.mybatisplus.core.metadata.TableInfo tableInfo) |
| 限定符和类型 | 方法和说明 |
|---|---|
List<String> |
chooseSelect(java.util.function.Predicate<com.baomidou.mybatisplus.core.metadata.TableFieldInfo> predicate,
String alias)
获取需要进行查询的 select sql 片段
|
private String |
formatLogicDeleteSql(boolean isWhere,
String alias)
format logic delete SQL, can be overrided by subclass
github #1386
|
static TableInfoExt |
get(Class<?> clz) |
String |
getAllSqlWhere(boolean ignoreLogicDelFiled,
boolean withId,
String prefix)
获取所有的查询的 sql 片段
|
String |
getColumByProperty(String property)
根据属性名查询字段
|
String |
getLogicDeleteSql(boolean startWithAnd,
boolean isWhere) |
String |
getLogicDeleteSql(boolean startWithAnd,
boolean isWhere,
String alias)
获取逻辑删除字段的 sql 脚本
|
public TableInfoExt(com.baomidou.mybatisplus.core.metadata.TableInfo tableInfo)
public List<String> chooseSelect(java.util.function.Predicate<com.baomidou.mybatisplus.core.metadata.TableFieldInfo> predicate, String alias)
predicate - 过滤条件public String getAllSqlWhere(boolean ignoreLogicDelFiled, boolean withId, String prefix)
ignoreLogicDelFiled - 是否过滤掉逻辑删除字段withId - 是否包含 id 项prefix - 前缀public String getLogicDeleteSql(boolean startWithAnd, boolean isWhere, String alias)
startWithAnd - 是否以 and 开头isWhere - 是否需要的是逻辑删除值public String getLogicDeleteSql(boolean startWithAnd, boolean isWhere)
public static TableInfoExt get(Class<?> clz)
public String getColumByProperty(String property)
property - 属性名Copyright © 2025. All rights reserved.