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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

exprFmtWithParenFunction · 0.85
SQLStringMethod · 0.65
HasFlagsMethod · 0.45

Tested by

no test coverage detected