pub fn as_float(&self) -> Result<BigDecimal, DatamodelError> {
        match &self.value {
            ast::Expression::StringValue(value, _) => {
                self.wrap_error_from_result(value.parse::<BigDecimal>(), "numeric")
            }
            ast::Expression::NumericValue(value, _) => {
                self.wrap_error_from_result(value.parse::<BigDecimal>(), "numeric")
            }
            ast::Expression::Any(value, _) => self.wrap_error_from_result(value.parse::<BigDecimal>(), "numeric"),
            _ => Err(self.construct_type_mismatch_error("numeric")),
        }
    }
/// Tries to convert the wrapped value to a Prisma Float.
Tries to convert the wrapped value to a Prisma Float.
Tries to convert the wrapped value to a Prisma Float .
pub fn as_float(&self) -> Result<BigDecimal, DatamodelError> {
        match &self.value {
            ast::Expression::StringValue(value, _) => {
                self.wrap_error_from_result(value.parse::<BigDecimal>(), "numeric")
            }
            ast::Expression::NumericValue(value, _) => {
                self.wrap_error_from_result(value.parse::<BigDecimal>(), "numeric")
            }
            ast::Expression::Any(value, _) => self.wrap_error_from_result(value.parse::<BigDecimal>(), "numeric"),
            _ => Err(self.construct_type_mismatch_error("numeric")),
        }
    }
pub fn as_float ( & self ) -> Result < BigDecimal , DatamodelError > { match & self . value { ast :: Expression :: StringValue ( value , _ ) => { self . wrap_error_from_result ( value . parse :: < BigDecimal > ( ) , " " ) } ast :: Expression :: NumericValue ( value , _ ) => { self . wrap_error_from_result ( value . parse :: < BigDecimal > ( ) , " " ) } ast :: Expression :: Any ( value , _ ) => self . wrap_error_from_result ( value . parse :: < BigDecimal > ( ) , " " ) , _ => Err ( self . construct_type_mismatch_error ( " " ) ) , } }
Tries to convert the wrapped value to a Prisma Float.
Tries to convert the wrapped value to a Prisma Float .
&self
&self