MCPcopy Create free account
hub / github.com/dolthub/doltgresql / JoinDoc

Function JoinDoc

postgres/parser/pretty/util.go:39–48  ·  view source on GitHub ↗

JoinDoc joins Docs d with Doc s.

(s Doc, d ...Doc)

Source from the content-addressed store, hash-verified

37
38// JoinDoc joins Docs d with Doc s.
39func JoinDoc(s Doc, d ...Doc) Doc {
40 switch len(d) {
41 case 0:
42 return Nil
43 case 1:
44 return d[0]
45 default:
46 return Fold(Concat, d[0], s, JoinDoc(s, d[1:]...))
47 }
48}
49
50// JoinNestedRight nests nested with string s.
51// Every item after the first is indented.

Callers 2

docMethod · 0.92
JoinFunction · 0.85

Calls 1

FoldFunction · 0.85

Tested by

no test coverage detected