sql-formatter
sql-formatter copied to clipboard
Add paramTypes config option
Added new config option paramTypes which allows overriding the prepared statement parameter types supported by default.
Did some slight restructuring of Tokenizer to allow config options to effect which kind of placeholder syntax is supported. This means that the parameter token regexes are no more cached, which however shouldn't be much of a performance concern as the really expensive part is building those large regexes form matching keywords. But will run some benchmarks to verify.
Fixes #367
Ran some performance tests and as expected the differences were pretty much non-existant:
- in Firefox the new version was a few percentages slower
- in Chrome the new version was a few percentages faster
So, no measurable difference really.