INNER CODE UNIT · Rust

fmt

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

    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        write!(f, "{} unimplemented: {}", self.kind, self.target)
    }
}

impl std::error::Error for UnimplementedError {}

pub fn parse(doc: Document) -> Result<String> {
    if doc.is_empty() {
        return Ok("".to_string());
    }
    let bson: Bson = doc.into();
    let json = serde_json::Value::Object(
        expand_object(bson.into_psql_json().as_object().unwrap()).unwrap(),
    );
    let str = serde_json::to_string(&json)?;
    let expression = mongodb_language_model::parse(&str)?;
    log::trace!("{:#?}", expression);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…