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

Method doc_order_by_expr

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

Source from the content-addressed store, hash-verified

933 }
934
935 fn doc_order_by_expr<'a, T: AstInfo>(&'a self, v: &'a OrderByExpr<T>) -> RcDoc<'a> {
936 let doc = self.doc_expr(&v.expr);
937 let doc = match v.asc {
938 Some(true) => nest(doc, RcDoc::text("ASC")),
939 Some(false) => nest(doc, RcDoc::text("DESC")),
940 None => doc,
941 };
942 match v.nulls_last {
943 Some(true) => nest(doc, RcDoc::text("NULLS LAST")),
944 Some(false) => nest(doc, RcDoc::text("NULLS FIRST")),
945 None => doc,
946 }
947 }
948
949 fn doc_query<'a, T: AstInfo>(&'a self, v: &'a Query<T>) -> RcDoc<'a> {
950 let mut docs = vec![];

Callers 2

doc_subscribeMethod · 0.80
doc_order_byMethod · 0.80

Calls 2

nestFunction · 0.85
doc_exprMethod · 0.80

Tested by

no test coverage detected