Optionally parse numbers into BigDecimals

With `--features bigdecimal`, parse numbers into BigDecimals instead of
leaving them as strings.
This commit is contained in:
Nikhil Benesch 2019-08-13 14:42:31 -04:00
parent b5621c0fe8
commit a0aca824e8
No known key found for this signature in database
GPG key ID: FCF98542083C5A69
7 changed files with 95 additions and 57 deletions

View file

@ -136,3 +136,7 @@ pub fn expr_from_projection(item: &SelectItem) -> &Expr {
_ => panic!("Expected UnnamedExpr"),
}
}
pub fn number(n: &'static str) -> Value {
Value::Number(n.parse().unwrap())
}