Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Sep 14, 2023
1 parent 9751120 commit 26cde4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/webserver/database/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ fn extract_static_simple_select(
};
let mut map = serde_json::Map::with_capacity(select_items.len());
for select_item in select_items {
let sqlparser::ast::SelectItem::ExprWithAlias { expr, alias } = select_item else { return None };
let sqlparser::ast::SelectItem::ExprWithAlias { expr, alias } = select_item else {
return None;
};
let value = match expr {
Expr::Value(Value::Boolean(b)) => serde_json::Value::Bool(*b),
Expr::Value(Value::Number(n, _)) => serde_json::Value::Number(n.parse().ok()?),
Expand Down

0 comments on commit 26cde4f

Please sign in to comment.