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

SQL format won't allow change of dialect on error #1448

Open
PhilXPO opened this issue Apr 10, 2024 · 0 comments
Open

SQL format won't allow change of dialect on error #1448

PhilXPO opened this issue Apr 10, 2024 · 0 comments

Comments

@PhilXPO
Copy link

PhilXPO commented Apr 10, 2024

Current behavior

  1. Select SQL format action
  2. At this stage, SQL Dialect is greyed out
  3. Enter valid T-SQL code
  4. Error - not a valid code in default dialect
  5. SQL Dialect is greyed out (due to an error, presumably)
  6. Clear your input, enter valid code for default dialect
  7. Change the dialect to T-SQL
  8. Clear input and enter the T-SQL code
  9. Output is not formatted T-SQL code

Likewise, inserting functional code and changing dialect which causes parse error will lock user out of the dialect change:
stringis

Expected behavior

It should be possible to change the dialect on parse error, considering the target dialect may not result in an error.
Alternatively, it should be possible to change dialect while the input is blank.
Preferrably both.

Environment

  • string-is version: v1.37.3 027b426
  • Share link: please use below examples

Example code

  • Valid SQL: select yourfield
  • Valid T-SQL but invalid SQL: select [yourfield]
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

No branches or pull requests

1 participant