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

Method doc_create_view

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

Source from the content-addressed store, hash-verified

698 }
699
700 pub(crate) fn doc_create_view<'a, T: AstInfo>(
701 &'a self,
702 v: &'a CreateViewStatement<T>,
703 ) -> RcDoc<'a> {
704 let mut docs = vec![];
705 docs.push(RcDoc::text(format!(
706 "CREATE{}{} VIEW{}",
707 if v.if_exists == IfExistsBehavior::Replace {
708 " OR REPLACE"
709 } else {
710 ""
711 },
712 if v.temporary { " TEMPORARY" } else { "" },
713 if v.if_exists == IfExistsBehavior::Skip {
714 " IF NOT EXISTS"
715 } else {
716 ""
717 },
718 )));
719 docs.push(self.doc_view_definition(&v.definition));
720 intersperse_line_nest(docs)
721 }
722
723 pub(crate) fn doc_create_materialized_view<'a, T: AstInfo>(
724 &'a self,

Callers 1

to_docMethod · 0.80

Calls 3

intersperse_line_nestFunction · 0.85
doc_view_definitionMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected