mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-11 06:22:04 +00:00
Support INSERT IGNORE
in MySql
and GenericDialect
(#1004)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
parent
6739d377bd
commit
86aa1b96be
3 changed files with 50 additions and 1 deletions
|
@ -6755,6 +6755,9 @@ impl<'a> Parser<'a> {
|
|||
None
|
||||
};
|
||||
|
||||
let ignore = dialect_of!(self is MySqlDialect | GenericDialect)
|
||||
&& self.parse_keyword(Keyword::IGNORE);
|
||||
|
||||
let action = self.parse_one_of_keywords(&[Keyword::INTO, Keyword::OVERWRITE]);
|
||||
let into = action == Some(Keyword::INTO);
|
||||
let overwrite = action == Some(Keyword::OVERWRITE);
|
||||
|
@ -6852,6 +6855,7 @@ impl<'a> Parser<'a> {
|
|||
Ok(Statement::Insert {
|
||||
or,
|
||||
table_name,
|
||||
ignore,
|
||||
into,
|
||||
overwrite,
|
||||
partitioned,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue