Input data
sqlFormatter.format('SELECT * FROM tbl WHERE foo = ?', {
language:'plsql',
params: ["'bar'"]
})
Expected Output
select
*
from
table
where
name like 'bar'
Actual Output

TokenizerEngine.ts:49 Uncaught Error: Parse error: Unexpected "?" at line 1 column 31.
SQL dialect used: "plsql".
at HR.createParseError (TokenizerEngine.ts:61:12)
at HR.tokenize (TokenizerEngine.ts:49:22)
at VR.tokenize (Tokenizer.ts:26:65)
at wR.tokenize (createParser.ts:23:37)
at wR.reset (LexerAdapter.ts:18:24)
at Object.parse (createParser.ts:33:34)
at tA.parse (Formatter.ts:37:49)
at tA.format (Formatter.ts:31:22)
at oA (sqlFormatter.ts:97:57)
Usage
-
How are you calling / using the library?
-
What SQL language(s) does this apply to?
redshift,hive,plsql,singlestoredb,snowflake,spark,transactsql
These dialects have this problem.
-
Which SQL Formatter version are you using?
v15.4.6