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

Method Format

postgres/parser/sem/tree/expr.go:993–1004  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

991
992// Format implements the NodeFormatter interface.
993func (node *ArrayFlatten) Format(ctx *FmtCtx) {
994 ctx.WriteString("ARRAY ")
995 exprFmtWithParen(ctx, node.Subquery)
996 if ctx.HasFlags(FmtParsable) {
997 if t, ok := node.Subquery.(*DTuple); ok {
998 if len(t.D) == 0 {
999 ctx.WriteString(":::")
1000 ctx.Buffer.WriteString(node.typ.SQLString())
1001 }
1002 }
1003 }
1004}
1005
1006// Exprs represents a list of value expressions. It's not a valid expression
1007// because it's not parenthesized.

Callers

nothing calls this directly

Calls 4

exprFmtWithParenFunction · 0.85
WriteStringMethod · 0.80
SQLStringMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected