forked from github/dataease
feat(仪表板): 文本搜索组件忽略大小写
This commit is contained in:
parent
a1b702fdc6
commit
5ebba3a5e5
@ -1109,7 +1109,9 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
@ -1096,7 +1096,9 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
if (request.getDatasetTableField().getDeExtractType() == 2
|
||||
|
@ -1181,7 +1181,9 @@ public class CKQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
@ -1169,7 +1169,9 @@ public class Db2QueryProvider extends QueryProvider {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
@ -1119,7 +1119,9 @@ public class EsQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
@ -1075,7 +1075,9 @@ public class HiveQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
@ -1077,7 +1077,9 @@ public class ImpalaQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
@ -979,7 +979,9 @@ public class MongoQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
@ -1104,7 +1104,9 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
if (request.getDatasetTableField().getDeExtractType() == 2
|
||||
|
@ -1259,7 +1259,9 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
@ -1127,7 +1127,9 @@ public class PgQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
@ -1108,7 +1108,9 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
|
@ -1131,7 +1131,9 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
whereName = "upper(" + whereName + ")";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == DeTypeConstants.DE_TIME) {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
Loading…
Reference in New Issue
Block a user