Package | Description |
---|---|
cn.hutool.db |
Hutool-db是一个在JDBC基础上封装的数据库操作工具类,通过包装,使用ActiveRecord思想操作数据库。
|
cn.hutool.db.sql |
SQL语句和Statement构建封装
|
Modifier and Type | Method and Description |
---|---|
List<Entity> |
SqlConnRunner.findLike(Connection conn,
String tableName,
String field,
String value,
Condition.LikeType likeType)
根据某个字段名条件查询数据列表,返回所有字段
|
List<Entity> |
AbstractDb.findLike(String tableName,
String field,
String value,
Condition.LikeType likeType)
根据某个字段名条件查询数据列表,返回所有字段
|
Modifier and Type | Method and Description |
---|---|
static Condition.LikeType |
Condition.LikeType.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Condition.LikeType[] |
Condition.LikeType.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static String |
SqlUtil.buildLikeValue(String value,
Condition.LikeType likeType,
boolean withLikeKeyword)
创建LIKE语句中的值,创建的结果为:
1、LikeType.StartWith: '%value'
2、LikeType.EndWith: 'value%'
3、LikeType.Contains: '%value%'
如果withLikeKeyword为true,则结果为:
1、LikeType.StartWith: LIKE '%value'
2、LikeType.EndWith: LIKE 'value%'
3、LikeType.Contains: LIKE '%value%'
|
Constructor and Description |
---|
Condition(String field,
String value,
Condition.LikeType likeType)
构造
|
Copyright © 2024. All rights reserved.