-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi, thanks for your extension :-)
I'm using inline SQL with other coding languages like PHP and a common implementation is using the so called bind-variables that are escaped and passed into the SQL as parameters.
A special character is usually defined to identify the inline parameter within the SQL, like : but anthing else can be defined.
This is a SQL example before formatting, please note the :myParam
SELECT
NULL
FROM
t_sample
WHERE
smp_id = :myParamThe problem is that any symbol near the parameter gets moved after formatting, changing from :myParam into : myParam.
See below
SELECT
NULL
FROM
t_sample
WHERE
smp_id = : myParamWould you consider enhancing your plugin with the following ideas?
- Add an optional parameter in the plugin's settings so to choose the symbol for bind-variables. Then alter the formatting accordingly by taking into accound the chosen symbol.
- Otherwise, if the above is too much, just fix the formatting. Perhaps symbols that are not reserved in the SQL context, like
:, should not be moved of position.
Thanks a mill!
P.S. Some others formatting extensions do not have this problem, but they do not nicelly format like yours, so I hope for your help here :-)