INNER CODE UNIT · Rust

str_to_jsonb

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

pub fn str_to_jsonb(value: String) -> String {
    format!("'{}'", value)
}

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),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…