-
Notifications
You must be signed in to change notification settings - Fork 432
Description
Hi, I'm using the formatter as part of a Visual Studio Code plugin and I'd like to suggest a minor change.
I'm using inline SQL (i.e. MySQL) 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 anything else (not reserved) can be used.
This is a SQL example before formatting, please note the :myParam
SELECT
NULL
FROM
t_sample
WHERE
smp_id = :myParam
The 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 = : myParam
Is it possible to avoid this situation?
The syntax of the bind-variable should not get altered by getting split
Thanks a mill!