add orm support 修改@column中的解析代码,使之支持字符串 #305
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1.支持了单引号字符串。判断了单引号,并加了字符串正则 PATTERN_STRING = Pattern.compile("^[,#;"`]+$");防止sql注入 。
2.支持了窗口函数
3.修改了 PATTERN_FUNCTION 正则 ,加了括号匹配,参数中可以有函数
3.把sql函数和RAW_MAP代码移动到了新的类FunctionsAndRaws中。在SQL_FUNCTION_MAP添加了clickhouse的函数,并在RAW_MAP中添加了解析的关键字。
因为加上clickhosue的函数之后,AbstractSqlConfig 的代码多了很多行。将函数单独放一个类使AbstractSqlConfig 中的代码不那么拥挤