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

Method fmt_virtual_syntax

src/sql/src/plan/explain/text.rs:51–73  ·  view source on GitHub ↗
(
        &self,
        f: &mut fmt::Formatter<'_>,
        ctx: &mut PlanRenderingContext<'_, HirRelationExpr>,
    )

Source from the content-addressed store, hash-verified

49
50impl HirRelationExpr {
51 fn fmt_virtual_syntax(
52 &self,
53 f: &mut fmt::Formatter<'_>,
54 ctx: &mut PlanRenderingContext<'_, HirRelationExpr>,
55 ) -> fmt::Result {
56 if let Some(Except { all, lhs, rhs }) = Hir::un_except(self) {
57 if all {
58 writeln!(f, "{}ExceptAll", ctx.indent)?;
59 } else {
60 writeln!(f, "{}Except", ctx.indent)?;
61 }
62 ctx.indented(|ctx| {
63 lhs.fmt_text(f, ctx)?;
64 rhs.fmt_text(f, ctx)?;
65 Ok(())
66 })?;
67 } else {
68 // fallback to raw syntax formatting as a last resort
69 self.fmt_raw_syntax(f, ctx)?;
70 }
71
72 Ok(())
73 }
74
75 fn fmt_raw_syntax(
76 &self,

Callers 1

fmt_textMethod · 0.80

Calls 3

indentedMethod · 0.80
fmt_raw_syntaxMethod · 0.80
fmt_textMethod · 0.45

Tested by

no test coverage detected