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

Method doc_mutually_recursive

src/sql-pretty/src/doc.rs:1013–1027  ·  view source on GitHub ↗
(&'a self, v: &'a CteMutRec<T>)

Source from the content-addressed store, hash-verified

1011 }
1012
1013 fn doc_mutually_recursive<'a, T: AstInfo>(&'a self, v: &'a CteMutRec<T>) -> RcDoc<'a> {
1014 let mut docs = Vec::new();
1015 if !v.columns.is_empty() {
1016 docs.push(bracket(
1017 "(",
1018 comma_separate(|c| self.doc_display_pass(c), &v.columns),
1019 ")",
1020 ));
1021 }
1022 docs.push(bracket("AS (", self.doc_query(&v.query), ")"));
1023 nest(
1024 self.doc_display_pass(&v.name),
1025 RcDoc::intersperse(docs, Doc::line()).group(),
1026 )
1027 }
1028
1029 fn doc_set_expr<'a, T: AstInfo>(&'a self, v: &'a SetExpr<T>) -> RcDoc<'a> {
1030 match v {

Callers 1

doc_queryMethod · 0.80

Calls 8

bracketFunction · 0.85
comma_separateFunction · 0.85
nestFunction · 0.85
doc_display_passMethod · 0.80
doc_queryMethod · 0.80
groupMethod · 0.80
is_emptyMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected