pub fn unresolved_object_name(mut name: UnresolvedObjectName) -> Result<PartialName, PlanError> {
    if name.0.len() < 1 || name.0.len() > 3 {
        return Err(PlanError::MisqualifiedName(name.to_string()));
    }
    let out = PartialName {
        item: ident(
            name.0
                .pop()
                .expect("name checked to have at least one component"),
        ),
        schema: name.0.pop().map(ident),
        database: name.0.pop().map(ident),
    };
    assert!(name.0.is_empty());
    Ok(out)
}
/// Normalizes an unresolved object name.
Normalizes an unresolved object name.
Normalizes an unresolved object name .
pub fn unresolved_object_name(mut name: UnresolvedObjectName) -> Result<PartialName, PlanError> {
    if name.0.len() < 1 || name.0.len() > 3 {
        return Err(PlanError::MisqualifiedName(name.to_string()));
    }
    let out = PartialName {
        item: ident(
            name.0
                .pop()
                .expect("name checked to have at least one component"),
        ),
        schema: name.0.pop().map(ident),
        database: name.0.pop().map(ident),
    };
    assert!(name.0.is_empty());
    Ok(out)
}
pub fn unresolved_object_name ( mut name : UnresolvedObjectName ) -> Result < PartialName , PlanError > { if name . 0 . len ( ) < 1 || name . 0 . len ( ) > 3 { return Err ( PlanError :: MisqualifiedName ( name . to_string ( ) ) ) ; } let out = PartialName { item : ident ( name . 0 . pop ( ) . expect ( " " ) , ) , schema : name . 0 . pop ( ) . map ( ident ) , database : name . 0 . pop ( ) . map ( ident ) , } ; assert ! ( name 0 is_empty ( ) ) ; Ok ( out ) }
Normalizes an unresolved object name.
Normalizes an unresolved object name .
name
UnresolvedObjectName
name
UnresolvedObjectName