TablePlus-Windows
TablePlus-Windows copied to clipboard
"Queries > selected query > Beautify" make the query unable to run if there's an SQL comment "--" ("Uglify" even deletes part of comment..)
-
Which driver are you using and version of it (Ex: PostgreSQL 10.0): Microsoft SQL Server (run on a SQL Server 2019)
-
Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81): 182
-
The steps to reproduce this issue: 3.1. Click on "Queries" (left side) 3.2. Click on symbol on the right side of the "+" (in the "Queries" area) > click on "Add Folder to Queries..." 3.3. Click on a file with SQL comments 3.4. Click on "Beautify" (you will see the SQL comments "--" becoming "- -" and making the query with errors even though it was a good query before) 3.5. Run "Uglify" on query (and "- -" will become even worse, "-") 3.6. Run "Beautify" again (it will put a comma at the end of the so-called comment "-", making script even harder to fix in order to run properly); also, the "Beautified" script is not the same every time I press "Beautify" (with the same installed options; no default has been changed)
Example SQL script:
-- test beautify query
SELECT 1 -- another test because it just happens to be needed
, CASE WHEN 1=1 THEN 'Yes' ELSE 'No' END -- yet another test needed
, 2