MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / unresolve

Function unresolve

src/sql/src/normalize.rs:134–143  ·  view source on GitHub ↗

Unnormalizes an item name. This is the inverse of the [`unresolved_item_name`] function.

(name: FullItemName)

Source from the content-addressed store, hash-verified

132///
133/// This is the inverse of the [`unresolved_item_name`] function.
134pub fn unresolve(name: FullItemName) -> UnresolvedItemName {
135 // TODO(parkmycar): Refactor FullItemName to use `Ident`.
136 let mut out = vec![];
137 if let RawDatabaseSpecifier::Name(n) = name.database {
138 out.push(Ident::new_unchecked(n));
139 }
140 out.push(Ident::new_unchecked(name.schema));
141 out.push(Ident::new_unchecked(name.item));
142 UnresolvedItemName(out)
143}
144
145/// Converts an `UnresolvedItemName` to a `FullItemName` if the
146/// `UnresolvedItemName` is fully specified. Otherwise returns an error.

Callers 3

create_statementFunction · 0.85
index_sqlFunction · 0.85

Calls 2

UnresolvedItemNameClass · 0.85
pushMethod · 0.45

Tested by

no test coverage detected