Input data
Which SQL and options did you provide as input?
select * from test.[User]
Actual Output
Console Output
Uncaught Error: Parse error at token: [ at line 1 column 21
Unexpected OPEN_PAREN token: {"type":"OPEN_PAREN","raw":"[","text":"[","start":20}. Instead, I was expecting to see one of the following:
A LINE_COMMENT token based on:
comment → ● %LINE_COMMENT
_$ebnf$1 → _$ebnf$1 ● comment
_ → ● _$ebnf$1...
at Parser.feed (nearley.js:343:27)
at Object.parse (createParser.ts:33:34)
at Formatter.parse (Formatter.ts:41:49)
at Formatter.format (Formatter.ts:33:22)
at formatDialect (sqlFormatter.ts:94:57)
at formatSqlValue (index.vue:193:23)
at formatValue (index.vue:170:9)
at callWithErrorHandling (runtime-core.esm-bundler.js:158:18)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:17)
at SVGSVGElement.invoker (runtime-dom.esm-bundler.js:595:5)
Usage
- How are you calling / using the library?
import { formatDialect,sql,plsql,transactsql,postgresql } from 'sql-formatter'
formatDialect(sqlVal, { dialect: postgresql})
- What SQL language(s) does this apply to?
- postgresql
- Which SQL Formatter version are you using?
- 13.0.4