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

discuss: issue #3525 on pgsql, char ? in sql arguments #3528

Closed
wants to merge 1 commit into from

Conversation

wln32
Copy link
Member

@wln32 wln32 commented Apr 22, 2024

解决的思路如下:

  1. 检测到Raw类型的参数时,检测是否含有?号,如果有,在args中添加一个占位符类型的参数
    占位符类型 = type NoReplacement bool
  2. pgsql_do_filter.go文件里面的(*Driver).DoFilter函数做参数替换的时候,检测到问号的时候,根据index索引查找对应的args是不是刚才添加的占位符类型,如果是,就不替换,返回原字符串

只提供一种思路,可能使用了Raw类型的参数中有多个问号,或者问号前后也有问号之类的

不要合并

@gqcn
Copy link
Member

gqcn commented Apr 22, 2024

@wln32 如果是暂时不需要合并的pr,可以使用draft或者加上wip的标签。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@wln32 If it is a PR that does not need to be merged, you can use draft or add the wip tag.

@gqcn gqcn changed the title about issue #3525 关于pgsql,参数中带有?号的 discuss: issue #3525 on pgsql, char ? in sql arguments Apr 22, 2024
@wln32 wln32 marked this pull request as draft April 22, 2024 12:52
@wln32 wln32 closed this May 16, 2024
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.

None yet

3 participants