Closed lingyv-li closed 3 years ago
Ready to be reviewed. @sambekar15 Regarding documenting it, the internal document is not copied here yet. So I am posting the documentation here and you can help adding it.
dialect
This is an optional tag that marks the dialect of scripts which are being discovered in this block. All files which are matched using the includes
and excludes
rules in this block will be marked as this "dialect" of script. This is later passed to the parser implementations.
For SQL scripts when a dialect is provided, it must be one of DatabaseProduct. If a dialect is not provided, the default Oracle Lex with MYSQL_5 mode will be used.
Ready to be reviewed. @sambekar15 Regarding documenting it, the internal document is not copied here yet. So I am posting the documentation here and you can help adding it.
dialect
This is an optional tag that marks the dialect of scripts which are being discovered in this block. All files which are matched using the
includes
andexcludes
rules in this block will be marked as this "dialect" of script. This is later passed to the parser implementations.For SQL scripts when a dialect is provided, it must be one of DatabaseProduct. If a dialect is not provided, the default Oracle Lex with MYSQL_5 mode will be used. Thanks lingyv-li for creating this PR. i'll get to it soon this week and provide you feedback.
Hi @sambekar15 Have you got a chance to review?
@sambekar15 done!
Changes:
dialect.configureParser
method.dialect
FileInputConfig
andScriptInput
along the path.StatementParser.parseStatement
method.dialect
as one of the DatabaseProduct. Use the dialect to configure parser config if exists. Otherwise fallback to previous config (MYSQL_5).TODO:
Close #23