mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 11:17:23 +00:00
Support Mysql REPLACE
statement and PRIORITY
clause of INSERT
(#1072)
This commit is contained in:
parent
7ea47c71fb
commit
c62ecb1100
5 changed files with 211 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue