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

Method fold_grant_target_specification

src/sql/src/names.rs:2226–2259  ·  view source on GitHub ↗
(
        &mut self,
        node: GrantTargetSpecification<Raw>,
    )

Source from the content-addressed store, hash-verified

2224 }
2225
2226 fn fold_grant_target_specification(
2227 &mut self,
2228 node: GrantTargetSpecification<Raw>,
2229 ) -> GrantTargetSpecification<Aug> {
2230 match node {
2231 GrantTargetSpecification::Object {
2232 object_type: ObjectType::Type,
2233 object_spec_inner: GrantTargetSpecificationInner::Objects { names },
2234 } => GrantTargetSpecification::Object {
2235 object_type: ObjectType::Type,
2236 object_spec_inner: GrantTargetSpecificationInner::Objects {
2237 names: names
2238 .into_iter()
2239 .map(|name| match name {
2240 UnresolvedObjectName::Item(name) => {
2241 ResolvedObjectName::Item(self.resolve_item_name_name(
2242 name,
2243 // `{GRANT|REVOKE} ... ON TYPE ...` can only
2244 // refer to type names.
2245 ItemResolutionConfig {
2246 functions: false,
2247 types: true,
2248 relations: false,
2249 },
2250 ))
2251 }
2252 _ => self.fold_object_name(name),
2253 })
2254 .collect(),
2255 },
2256 },
2257 _ => mz_sql_parser::ast::fold::fold_grant_target_specification(self, node),
2258 }
2259 }
2260
2261 fn fold_doc_on_identifier(&mut self, node: DocOnIdentifier<Raw>) -> DocOnIdentifier<Aug> {
2262 match node {

Callers

nothing calls this directly

Calls 6

fold_object_nameMethod · 0.80
ItemEnum · 0.50
collectMethod · 0.45
mapMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected