Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加SQL参数填充对json的支持 #261

Merged
merged 5 commits into from
Jun 19, 2023
Merged

添加SQL参数填充对json的支持 #261

merged 5 commits into from
Jun 19, 2023

Conversation

alvinkwok1
Copy link
Contributor

#250

bugfix:SQL参数填充

  1. 修复传参为json的时候无法进行sql填充,提示参数错误的问题。这个修复逻辑是先进行,分割,再考虑将分割错误的数据通过特定的标记合并起来。

  2. 修复当参数中含有'没有进行转义的问题

测试数据:
UPDATE site_config SET site_title = ?, site_subtitle = ?, logo_path = ?, favicon_path = ? WHERE id = ? AND X=?
XXXX(String), ,(String)(String), null, {"goodsService":[],"goodsSpecs":{"id":"db6c56a224a788c5a7458017731c9255","imageFileId":"16925e7fc297452a984d4b3e2e9e6e40"}}(String), 1(Integer), '(String)

guop added 2 commits June 11, 2023 19:13
1. 修复传参为json的时候无法进行sql填充,提示参数错误的问题

2. 修复当参数中含有'没有进行转义的问题

测试数据:
UPDATE site_config SET site_title = ?, site_subtitle = ?, logo_path = ?, favicon_path = ? WHERE id = ? AND X=?
XXXX(String), ,(String)(String), null, {"goodsService":[],"goodsSpecs":{"id":"db6c56a224a788c5a7458017731c9255","imageFileId":"16925e7fc297452a984d4b3e2e9e6e40"}}(String), 1(Integer), '(String)
1. 修复传参为json的时候无法进行sql填充,提示参数错误的问题

2. 修复当参数中含有'没有进行转义的问题

测试数据:
UPDATE site_config SET site_title = ?, site_subtitle = ?, logo_path = ?, favicon_path = ? WHERE id = ? AND X=?
XXXX(String), ,(String)(String), null, {"goodsService":[],"goodsSpecs":{"id":"db6c56a224a788c5a7458017731c9255","imageFileId":"16925e7fc297452a984d4b3e2e9e6e40"}}(String), 1(Integer), '(String)
@alvinkwok1
Copy link
Contributor Author

但是对于特殊的数据, 例如{"goodsService":[],"goodsSpecs":{"id":"db6c56a224a788c5a7458017731c9255","imageFileId":"16925e7fc297452a984d4b3e2e9e6e40","unsupported":"),"}}(String)
unsupported 字段中含了), 按现有逻辑处理还是会分割错误

不知道是否还有些更好的方案来完成

guop added 3 commits June 11, 2023 21:47
添加URL解析功能,存在的问题是如果参数过多将无法展示
添加URL解析功能,存在的问题是如果参数过多将无法展示
添加URL解析功能,存在的问题是如果参数过多将无法展示
@baiy baiy merged commit 7005fb5 into baiy:master Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants