Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.75k stars 1.57k forks source link

Select from MySql data source where clause with a forward slash in handlebar variable does not work #14751

Closed hatimjodiyawalla closed 2 weeks ago

hatimjodiyawalla commented 1 month ago

Checklist

Hosting

Describe the bug I am reading a MySQL view through a query and using a handlebar binding as one of the variables in the WHERE clause. select * from bc_pkbatchBB where PkBatch = {{ varPkBatch }} PkBatch has various entries including "10/1" and "10/2" etc. When I try and read this with varPkBatch set to 10/1 then I don't get any entries returned. If I set the value to 10 then I get both the entries with 10/1 and 10/2 returned. I suspected that it has something with escaping the characters and have used quotes inside the where clause moustache like {{ "varPkBatch" }} and various other options but to no avail. What I need the select to look like is as follows for it to work:

select * from bc_pkbatchBB where PkBatch = '10/1'

i.e. with the apostraphes around the variable to make it a text.

To Reproduce Steps to reproduce the behavior:

  1. Create a MySQL view which has entries in one of the fields that has forward slashes but is a text field.
  2. Create a query in the Data section of the App querying this view similar to above.
  3. Put the binding name: varPkBatch, Default 10/1.
  4. See no entries returned

Expected behavior I want the entry with 10/1 to be returned

Screenshots image

Desktop (please complete the following information):

linear[bot] commented 1 month ago

BUDI-8716 Select from MySql data source where clause with a forward slash in handlebar variable does not work

mike12345567 commented 2 weeks ago

This should be fixed in 2.33.12.