Skip to content

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

@PhilXPO

Description

@PhilXPO

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions