mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 06:18:17 +00:00
Add support for MySQL's INSERT INTO ... SET syntax (#1641)
This commit is contained in:
parent
4c6af0ae4f
commit
8cfc46277f
7 changed files with 43 additions and 20 deletions
|
@ -119,6 +119,12 @@ fn parse_insert_values() {
|
|||
verified_stmt("INSERT INTO customer WITH foo AS (SELECT 1) SELECT * FROM foo UNION VALUES (1)");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_insert_set() {
|
||||
let dialects = all_dialects_where(|d| d.supports_insert_set());
|
||||
dialects.verified_stmt("INSERT INTO tbl1 SET col1 = 1, col2 = 'abc', col3 = current_date()");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_replace_into() {
|
||||
let dialect = PostgreSqlDialect {};
|
||||
|
|
|
@ -4423,6 +4423,7 @@ fn test_simple_postgres_insert_with_alias() {
|
|||
settings: None,
|
||||
format_clause: None,
|
||||
})),
|
||||
assignments: vec![],
|
||||
partitioned: None,
|
||||
after_columns: vec![],
|
||||
table: false,
|
||||
|
@ -4493,6 +4494,7 @@ fn test_simple_postgres_insert_with_alias() {
|
|||
settings: None,
|
||||
format_clause: None,
|
||||
})),
|
||||
assignments: vec![],
|
||||
partitioned: None,
|
||||
after_columns: vec![],
|
||||
table: false,
|
||||
|
@ -4559,6 +4561,7 @@ fn test_simple_insert_with_quoted_alias() {
|
|||
settings: None,
|
||||
format_clause: None,
|
||||
})),
|
||||
assignments: vec![],
|
||||
partitioned: None,
|
||||
after_columns: vec![],
|
||||
table: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue