Skip to main content

admin_command_heads_statement

Function admin_command_heads_statement 

Source
pub fn admin_command_heads_statement(plan: &LogicalPlan) -> bool
Expand description

ADR-0116 §2, amended 2026-11-04: whether the statement’s body is headed by a database-administration command — the first top-level clause after any leading USE clauses is one of the §2 commands. This is the shape the 42N79 auto-routing gate is scoped to: every headed spelling under a non-system USE (bare, YIELD … RETURN …, UNION arm, ALTER DATABASE) is 42N79. A command later in the body (after e.g. a MATCH, or behind a leading WITH) is not headed, so that gate passes it through to the namespace gates — where, off system, it is the composed-form rejection instead (ADR-0590). Part-granular on the head part only: a command headed in a NEXT stage is already refused by the NEXT-chain rule (is_show_databases_with_next), and USE clauses never split parts.