1
2
3
4
5
6
7
8
9
use query_structure::PrismaValue;

pub fn coerce_null_to_zero_value(value: PrismaValue) -> PrismaValue {
    if let PrismaValue::Null = value {
        PrismaValue::Int(0)
    } else {
        value
    }
}