MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Format

Method Format

pkg/sql/sem/tree/expr.go:904–915  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

902
903// Format implements the NodeFormatter interface.
904func (node *ArrayFlatten) Format(ctx *FmtCtx) {
905 ctx.WriteString("ARRAY ")
906 exprFmtWithParen(ctx, node.Subquery)
907 if ctx.HasFlags(FmtParsable) {
908 if t, ok := node.Subquery.(*DTuple); ok {
909 if len(t.D) == 0 {
910 ctx.WriteString(":::")
911 ctx.Buffer.WriteString(node.typ.SQLString())
912 }
913 }
914 }
915}
916
917// Exprs represents a list of value expressions. It's not a valid expression
918// because it's not parenthesized.

Callers

nothing calls this directly

Calls 3

exprFmtWithParenFunction · 0.85
SQLStringMethod · 0.80
HasFlagsMethod · 0.45

Tested by

no test coverage detected