appsmithorg / appsmithorg/appsmith

[Bug]-[45]:For an SQL query, can't make this regex work

未关闭
#7,484 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Bug Integrations Pod General Integrations Product Low Medium effort Postgres Production Query & JS Pod Query Widgets & IDE Pod
主要语言
TypeScript
星标
40.9k
派生
4.8k
平均合并
1 天 22 小时
30 天内合并 PR
45

描述

## Description
For an SQL query can't make this regex work: '{{Input1.text.replace(/'/, "")}}'
for example:
`SELECT * FROM users where gender = '{{Input1.text.replace(/'/, "")}}' ORDER BY id LIMIT 10;`

### Steps to reproduce the behaviour:
1. Add an input widget: enter text `male` within the input
2. Create a query on the test postgres DB: `SELECT * FROM users where gender = '{{Input1.text.replace(/'/, "")}}' ORDER BY id LIMIT 10;`
3. The query above doesn't run

![image](https://user-images.githubusercontent.com/1944800/133479682-45179d42-7ce6-41a8-9618-63ea88449128.png)

### Workaround

https://github.com/appsmithorg/appsmith/issues/7484#issuecomment-1021190239

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。