INNER CODE UNIT · Rust

from

apache/datafusion-sqlparser-rs · src/ast/mod.rs:442

    fn from(idents: Vec<Ident>) -> Self {
        ObjectName(idents.into_iter().map(ObjectNamePart::Identifier).collect())
    }
}

impl From<Ident> for ObjectName {
    fn from(ident: Ident) -> Self {
        ObjectName(vec![ObjectNamePart::Identifier(ident)])
    }
}

impl fmt::Display for ObjectName {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", display_separated(&self.0, "."))
    }
}

/// A single part of an ObjectName

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…