(&self, a: Self::Input<'a>)
| 182 | type Output<'a> = Result<Numeric, EvalError>; |
| 183 | |
| 184 | fn call<'a>(&self, a: Self::Input<'a>) -> Self::Output<'a> { |
| 185 | let mut d = strconv::parse_numeric(a)?; |
| 186 | if let Some(scale) = self.0 { |
| 187 | if numeric::rescale(&mut d.0, scale.into_u8()).is_err() { |
| 188 | return Err(EvalError::NumericFieldOverflow); |
| 189 | } |
| 190 | } |
| 191 | Ok(d.into_inner()) |
| 192 | } |
| 193 | |
| 194 | fn output_sql_type(&self, input: SqlColumnType) -> SqlColumnType { |
| 195 | SqlScalarType::Numeric { max_scale: self.0 }.nullable(input.nullable) |
nothing calls this directly
no test coverage detected