Commit 7689818 1 parent 204ac57 commit 7689818 Copy full SHA for 7689818
File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,10 @@ Parses SQL string and returns the CST tree. Takes the following options:
196
196
By default a query like ` SELECT * FROM tbl WHERE id = ? ` will result in parse error.
197
197
To fix it, use ` paramTypes: ["?"] ` config option.
198
198
- ** filename** : ` string ` Name of the SQL file. This is only used for error-reporting.
199
+ - ** acceptUnsupportedGrammar** : ` boolean ` When enabled, code that would otherwise fail to parse,
200
+ gets parsed as ` unsupported_grammar_stmt ` node. That will consume all text until the next semicolon.
201
+ After the semicolon, parsing will resume as normal. This option is primarily intended as a workaround
202
+ for using the parser with an SQL dialect that's not yet 100% supported.
199
203
200
204
When parsing fails with syntax error, it throws ` FormattedSyntaxError ` which contains a message like:
201
205
You can’t perform that action at this time.
0 commit comments