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

Function resolve_schema

src/sql/src/plan/statement/ddl.rs:7866–7876  ·  view source on GitHub ↗
(
    scx: &'a StatementContext,
    name: UnresolvedSchemaName,
    if_exists: bool,
)

Source from the content-addressed store, hash-verified

7864}
7865
7866pub(crate) fn resolve_schema<'a>(
7867 scx: &'a StatementContext,
7868 name: UnresolvedSchemaName,
7869 if_exists: bool,
7870) -> Result<Option<(ResolvedDatabaseSpecifier, SchemaSpecifier)>, PlanError> {
7871 match scx.resolve_schema(name) {
7872 Ok(schema) => Ok(Some((schema.database().clone(), schema.id().clone()))),
7873 Err(_) if if_exists => Ok(None),
7874 Err(e) => Err(e),
7875 }
7876}
7877
7878pub(crate) fn resolve_network_policy<'a>(
7879 scx: &'a StatementContext,

Callers 3

plan_alter_schema_ownerFunction · 0.85
plan_drop_schemaFunction · 0.85
plan_alter_schema_renameFunction · 0.85

Calls 4

resolve_schemaMethod · 0.45
cloneMethod · 0.45
databaseMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected