For extension "labsql". After writing up a brief description, we recommend including the following sections.
This is an chatGTP generated extension that reformats SQL so it can be used as codelines, it also reformarts the code back to SQL.
the original chatGPT request: Summary of the request:
Create a Visual Studio Code extension with two commands. The first command, "Format SQL as Concatenated String", should format the selected SQL text according to the following rules: a. Start with sql = "". b. Every line should be like sql = sql + "selected text". c. The result may not contain lines longer than 70 characters; if needed, the line should be split. d. Words cannot be split. The second command, "Reverse Formatted SQL to Original", should reverse the formatted SQL string back to the original SQL string when selected.
Originally targets Labware Basic and SQL Server syntax
no settings changed
updated the code, it works for 99%
second release variable naming is now flexible
second release of package