mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-12-23 11:12:51 +00:00
Encapsulate Insert and Delete into specific structs (#1224)
Signed-off-by: tison <wander4096@gmail.com>
This commit is contained in:
parent
d2c2b15f9e
commit
bf89b7d808
7 changed files with 187 additions and 147 deletions
|
|
@ -7082,7 +7082,7 @@ impl<'a> Parser<'a> {
|
|||
None
|
||||
};
|
||||
|
||||
Ok(Statement::Delete {
|
||||
Ok(Statement::Delete(Delete {
|
||||
tables,
|
||||
from: if with_from_keyword {
|
||||
FromTable::WithFromKeyword(from)
|
||||
|
|
@ -7094,7 +7094,7 @@ impl<'a> Parser<'a> {
|
|||
returning,
|
||||
order_by,
|
||||
limit,
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
// KILL [CONNECTION | QUERY | MUTATION] processlist_id
|
||||
|
|
@ -8658,7 +8658,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
let insert = &mut self.parse_insert()?;
|
||||
if let Statement::Insert { replace_into, .. } = insert {
|
||||
if let Statement::Insert(Insert { replace_into, .. }) = insert {
|
||||
*replace_into = true;
|
||||
}
|
||||
|
||||
|
|
@ -8826,7 +8826,7 @@ impl<'a> Parser<'a> {
|
|||
None
|
||||
};
|
||||
|
||||
Ok(Statement::Insert {
|
||||
Ok(Statement::Insert(Insert {
|
||||
or,
|
||||
table_name,
|
||||
table_alias,
|
||||
|
|
@ -8843,7 +8843,7 @@ impl<'a> Parser<'a> {
|
|||
replace_into,
|
||||
priority,
|
||||
insert_alias,
|
||||
})
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue