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

Method doc_create_cluster_replica

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

Source from the content-addressed store, hash-verified

463 }
464
465 pub(crate) fn doc_create_cluster_replica<'a, T: AstInfo>(
466 &'a self,
467 v: &'a CreateClusterReplicaStatement<T>,
468 ) -> RcDoc<'a> {
469 let mut docs = Vec::new();
470
471 // CREATE CLUSTER REPLICA cluster.replica
472 let replica_name = RcDoc::concat([
473 self.doc_display_pass(&v.of_cluster),
474 RcDoc::text("."),
475 self.doc_display_pass(&v.definition.name),
476 ]);
477 docs.push(nest_title("CREATE CLUSTER REPLICA", replica_name));
478
479 // OPTIONS (...)
480 docs.push(bracket(
481 "(",
482 comma_separate(|o| self.doc_display_pass(o), &v.definition.options),
483 ")",
484 ));
485
486 RcDoc::intersperse(docs, Doc::line()).group()
487 }
488
489 pub(crate) fn doc_create_network_policy<'a, T: AstInfo>(
490 &'a self,

Callers 1

to_docMethod · 0.80

Calls 7

concatFunction · 0.85
nest_titleFunction · 0.85
bracketFunction · 0.85
comma_separateFunction · 0.85
doc_display_passMethod · 0.80
groupMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected