Support multiple tables in UPDATE FROM clause (#1681)

This commit is contained in:
Ifeanyi Ubah 2025-01-28 08:45:14 +01:00 committed by GitHub
parent 74163b148e
commit fdbe864d0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 14 deletions

View file

@ -3872,13 +3872,13 @@ impl fmt::Display for Statement {
}
write!(f, "{table}")?;
if let Some(UpdateTableFromKind::BeforeSet(from)) = from {
write!(f, " FROM {from}")?;
write!(f, " FROM {}", display_comma_separated(from))?;
}
if !assignments.is_empty() {
write!(f, " SET {}", display_comma_separated(assignments))?;
}
if let Some(UpdateTableFromKind::AfterSet(from)) = from {
write!(f, " FROM {from}")?;
write!(f, " FROM {}", display_comma_separated(from))?;
}
if let Some(selection) = selection {
write!(f, " WHERE {selection}")?;