Support INSERT IGNORE in MySql and GenericDialect (#1004)

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
Mehmet Emin KARAKAŞ 2023-10-24 12:45:25 +03:00 committed by GitHub
parent 6739d377bd
commit 86aa1b96be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 1 deletions

View file

@ -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,