prettier-sql
prettier-sql copied to clipboard
Support DELIMITER for MariaDB and MySQL
This is my initial attempt to address https://github.com/inferrinizzard/prettier-sql/issues/72. I am not sure if this is the right approach to fix the issue. There are also a couple of pending issues, one with spaces before END
in MariaDB and the other with missing new line before BEGIN
in MySQL.
I've thought about how an implementation for dynamic token input would work and I don't have an efficient solution yet since the RegEx for each language is baked and compiled into one hard-coded string, ie. the delimiter for all languages is always ';'.
Allowing users to dynamically regenerate this entire RegEx with custom delimiters/tokens would definitely be possible but will tank the processing time.
May implement this as an experimental feature once I am back from hiatus / as a part of 5.2.x release. Thank you for your help on the project! Feel free to share your thoughts on how best to implement this feature :)