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

Method doc_view_definition

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

Source from the content-addressed store, hash-verified

867 }
868
869 fn doc_view_definition<'a, T: AstInfo>(&'a self, v: &'a ViewDefinition<T>) -> RcDoc<'a> {
870 let mut docs = vec![RcDoc::text(v.name.to_string())];
871 if !v.columns.is_empty() {
872 docs.push(bracket(
873 "(",
874 comma_separate(|c| self.doc_display_pass(c), &v.columns),
875 ")",
876 ));
877 }
878 docs.push(nest_title("AS", self.doc_query(&v.query)));
879 RcDoc::intersperse(docs, Doc::line()).group()
880 }
881
882 pub(crate) fn doc_insert<'a, T: AstInfo>(&'a self, v: &'a InsertStatement<T>) -> RcDoc<'a> {
883 let mut first = vec![RcDoc::text(format!(

Callers 1

doc_create_viewMethod · 0.80

Calls 8

bracketFunction · 0.85
comma_separateFunction · 0.85
nest_titleFunction · 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