|
@@ -45,6 +45,18 @@ public final class SqlServerConnector extends AbstractDatabaseConnector {
|
|
return new Object[]{(pageIndex - 1) * pageSize + 1, pageIndex * pageSize};
|
|
return new Object[]{(pageIndex - 1) * pageSize + 1, pageIndex * pageSize};
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ protected String buildSqlFilterWithQuotation(String value) {
|
|
|
|
+ if (StringUtil.isNotBlank(value)) {
|
|
|
|
+ // 支持SqlServer系统函数(convert/varchar/getdate)
|
|
|
|
+ String val = value.toLowerCase();
|
|
|
|
+ if (StringUtil.contains(val, "convert") || StringUtil.contains(val, "varchar") || StringUtil.contains(val, "getdate")) {
|
|
|
|
+ return StringUtil.EMPTY;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return buildSqlWithQuotation();
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
protected String getQueryCountSql(CommandConfig commandConfig, String schema, String quotation, String queryFilterSql) {
|
|
protected String getQueryCountSql(CommandConfig commandConfig, String schema, String quotation, String queryFilterSql) {
|
|
// 视图或有过滤条件,走默认方式
|
|
// 视图或有过滤条件,走默认方式
|