mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 06:18:17 +00:00
Reduce nesting of if
s in SQLType::Decimal::to_string()
This commit is contained in:
parent
451513db5b
commit
5263ee1e9e
1 changed files with 3 additions and 5 deletions
|
@ -76,12 +76,10 @@ impl ToString for SQLType {
|
|||
SQLType::Decimal(precision, scale) => {
|
||||
if let Some(scale) = scale {
|
||||
format!("numeric({},{})", precision.unwrap(), scale)
|
||||
} else if let Some(precision) = precision {
|
||||
format!("numeric({})", precision)
|
||||
} else {
|
||||
if let Some(precision) = precision {
|
||||
format!("numeric({})", precision)
|
||||
} else {
|
||||
format!("numeric")
|
||||
}
|
||||
format!("numeric")
|
||||
}
|
||||
}
|
||||
SQLType::SmallInt => "smallint".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue