mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-11-25 00:19:37 +00:00
Cargo format
This commit is contained in:
parent
dcb6f5b012
commit
c565717a7d
2 changed files with 27 additions and 17 deletions
|
|
@ -851,20 +851,21 @@ impl Spanned for Delete {
|
|||
|
||||
union_spans(
|
||||
core::iter::once(delete_token.0.span).chain(
|
||||
tables
|
||||
.iter()
|
||||
.map(|i| i.span())
|
||||
.chain(core::iter::once(from.span()))
|
||||
.chain(
|
||||
using
|
||||
.iter()
|
||||
.map(|u| union_spans(u.iter().map(|i| i.span()))),
|
||||
)
|
||||
.chain(selection.iter().map(|i| i.span()))
|
||||
.chain(returning.iter().flat_map(|i| i.iter().map(|k| k.span())))
|
||||
.chain(order_by.iter().map(|i| i.span()))
|
||||
.chain(limit.iter().map(|i| i.span())),
|
||||
))
|
||||
tables
|
||||
.iter()
|
||||
.map(|i| i.span())
|
||||
.chain(core::iter::once(from.span()))
|
||||
.chain(
|
||||
using
|
||||
.iter()
|
||||
.map(|u| union_spans(u.iter().map(|i| i.span()))),
|
||||
)
|
||||
.chain(selection.iter().map(|i| i.span()))
|
||||
.chain(returning.iter().flat_map(|i| i.iter().map(|k| k.span())))
|
||||
.chain(order_by.iter().map(|i| i.span()))
|
||||
.chain(limit.iter().map(|i| i.span())),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11817,7 +11817,10 @@ impl<'a> Parser<'a> {
|
|||
/// Parse a DELETE statement, returning a `Box`ed SetExpr
|
||||
///
|
||||
/// This is used to reduce the size of the stack frames in debug builds
|
||||
fn parse_delete_setexpr_boxed(&mut self, delete_token: TokenWithSpan) -> Result<Box<SetExpr>, ParserError> {
|
||||
fn parse_delete_setexpr_boxed(
|
||||
&mut self,
|
||||
delete_token: TokenWithSpan,
|
||||
) -> Result<Box<SetExpr>, ParserError> {
|
||||
Ok(Box::new(SetExpr::Delete(self.parse_delete(delete_token)?)))
|
||||
}
|
||||
|
||||
|
|
@ -15471,7 +15474,10 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
/// Parse an REPLACE statement
|
||||
pub fn parse_replace(&mut self, replace_token: TokenWithSpan) -> Result<Statement, ParserError> {
|
||||
pub fn parse_replace(
|
||||
&mut self,
|
||||
replace_token: TokenWithSpan,
|
||||
) -> Result<Statement, ParserError> {
|
||||
if !dialect_of!(self is MySqlDialect | GenericDialect) {
|
||||
return parser_err!(
|
||||
"Unsupported statement REPLACE",
|
||||
|
|
@ -15490,7 +15496,10 @@ impl<'a> Parser<'a> {
|
|||
/// Parse an INSERT statement, returning a `Box`ed SetExpr
|
||||
///
|
||||
/// This is used to reduce the size of the stack frames in debug builds
|
||||
fn parse_insert_setexpr_boxed(&mut self, insert_token: TokenWithSpan) -> Result<Box<SetExpr>, ParserError> {
|
||||
fn parse_insert_setexpr_boxed(
|
||||
&mut self,
|
||||
insert_token: TokenWithSpan,
|
||||
) -> Result<Box<SetExpr>, ParserError> {
|
||||
Ok(Box::new(SetExpr::Insert(self.parse_insert(insert_token)?)))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue