-
Notifications
You must be signed in to change notification settings - Fork 443
Closed
Labels
Description
Input data
Which SQL and options did you provide as input?
SELECT A.T$REFA orderId from TABLE_NAME;Expected Output
SELECT
A.T$REFA orderId
from
TABLE_NAME;Actual Output
Error: Parse error: Unexpected "$REFA orde" at line 1 column 11.
This likely happens because you're using the default "sql" dialect.
If possible, please select a more specific dialect (like sqlite, postgresql, etc).
at TokenizerEngine.createParseError (TokenizerEngine.ts:61:12)
at TokenizerEngine.tokenize (TokenizerEngine.ts:49:22)
at Tokenizer.tokenize (Tokenizer.ts:26:65)
at LexerAdapter.tokenize (createParser.ts:23:37)
at LexerAdapter.reset (LexerAdapter.ts:18:24)
at Parser.feed (nearley.js:281:15)
at Object.parse (createParser.ts:33:34)
at Formatter.parse (Formatter.ts:37:49)
at Formatter.format (Formatter.ts:31:22)
at formatDialect (sqlFormatter.ts:97:57)Usage
- How are you calling / using the library?
import { format as formatSQL } from "sql-formatter";
const sql = 'SELECT A.T$REFA orderId from TABLE_NAME;'
format(sql, { language: "sql" })
-
What SQL language(s) does this apply to?
All of them I guess. -
Which SQL Formatter version are you using?
15.4.10