mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-12 11:14:59 +00:00
Support INSERT INTO ... DEFAULT VALUES ...
(#1036)
This commit is contained in:
parent
5bdf2e6608
commit
3d2773a794
5 changed files with 150 additions and 25 deletions
|
@ -941,7 +941,7 @@ fn parse_simple_insert() {
|
|||
assert_eq!(vec![Ident::new("title"), Ident::new("priority")], columns);
|
||||
assert!(on.is_none());
|
||||
assert_eq!(
|
||||
Box::new(Query {
|
||||
Some(Box::new(Query {
|
||||
with: None,
|
||||
body: Box::new(SetExpr::Values(Values {
|
||||
explicit_row: false,
|
||||
|
@ -969,7 +969,7 @@ fn parse_simple_insert() {
|
|||
fetch: None,
|
||||
locks: vec![],
|
||||
for_clause: None,
|
||||
}),
|
||||
})),
|
||||
source
|
||||
);
|
||||
}
|
||||
|
@ -995,7 +995,7 @@ fn parse_ignore_insert() {
|
|||
assert!(on.is_none());
|
||||
assert!(ignore);
|
||||
assert_eq!(
|
||||
Box::new(Query {
|
||||
Some(Box::new(Query {
|
||||
with: None,
|
||||
body: Box::new(SetExpr::Values(Values {
|
||||
explicit_row: false,
|
||||
|
@ -1011,7 +1011,7 @@ fn parse_ignore_insert() {
|
|||
fetch: None,
|
||||
locks: vec![],
|
||||
for_clause: None,
|
||||
}),
|
||||
})),
|
||||
source
|
||||
);
|
||||
}
|
||||
|
@ -1035,7 +1035,7 @@ fn parse_empty_row_insert() {
|
|||
assert!(columns.is_empty());
|
||||
assert!(on.is_none());
|
||||
assert_eq!(
|
||||
Box::new(Query {
|
||||
Some(Box::new(Query {
|
||||
with: None,
|
||||
body: Box::new(SetExpr::Values(Values {
|
||||
explicit_row: false,
|
||||
|
@ -1048,7 +1048,7 @@ fn parse_empty_row_insert() {
|
|||
fetch: None,
|
||||
locks: vec![],
|
||||
for_clause: None,
|
||||
}),
|
||||
})),
|
||||
source
|
||||
);
|
||||
}
|
||||
|
@ -1084,7 +1084,7 @@ fn parse_insert_with_on_duplicate_update() {
|
|||
columns
|
||||
);
|
||||
assert_eq!(
|
||||
Box::new(Query {
|
||||
Some(Box::new(Query {
|
||||
with: None,
|
||||
body: Box::new(SetExpr::Values(Values {
|
||||
explicit_row: false,
|
||||
|
@ -1108,7 +1108,7 @@ fn parse_insert_with_on_duplicate_update() {
|
|||
fetch: None,
|
||||
locks: vec![],
|
||||
for_clause: None,
|
||||
}),
|
||||
})),
|
||||
source
|
||||
);
|
||||
assert_eq!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue