Support Mysql REPLACE statement and PRIORITY clause of INSERT (#1072)

This commit is contained in:
Mehmet Emin KARAKAŞ 2023-12-24 15:24:53 +03:00 committed by GitHub
parent 7ea47c71fb
commit c62ecb1100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 211 additions and 2 deletions

View file

@ -107,6 +107,17 @@ fn parse_insert_values() {
verified_stmt("INSERT INTO customer WITH foo AS (SELECT 1) SELECT * FROM foo UNION VALUES (1)");
}
#[test]
fn parse_replace_into() {
let dialect = PostgreSqlDialect {};
let sql = "REPLACE INTO public.customer (id, name, active) VALUES (1, 2, 3)";
assert_eq!(
ParserError::ParserError("Unsupported statement REPLACE at Line: 1, Column 9".to_string()),
Parser::parse_sql(&dialect, sql,).unwrap_err(),
)
}
#[test]
fn parse_insert_default_values() {
let insert_with_default_values = verified_stmt("INSERT INTO test_table DEFAULT VALUES");