INNER CODE UNIT · Rust

value_to_jsonb

fcoury/oxide · src/parser/mod.rs:257

pub fn value_to_jsonb(value: &Bson) -> String {
    let new_value = value.clone().into_psql_json();
    new_value.to_string()
}

enum OperatorValueType {
    Json(serde_json::Value),
    Field(String),
}

impl fmt::Display for OperatorValueType {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match self {
            OperatorValueType::Json(json) => write!(f, "{}", json),
            OperatorValueType::Field(field) => write!(f, "{}", field),
        }
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…