appsmithorg / appsmithorg/appsmith

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

Aperta
#7,484 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Bug Integrations Pod General Integrations Product Low Medium effort Postgres Production Query & JS Pod Query Widgets & IDE Pod
Lingua principale
TypeScript
Stelle
40.9k
Fork
4.8k
Merge medio
1g 22h
PR unite (30g)
45

Descrizione

## 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.