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

Method StringWithFlags

postgres/parser/parser/parse.go:84–93  ·  view source on GitHub ↗

StringWithFlags returns the AST formatted as a string (with the given flags).

(flags tree.FmtFlags)

Source from the content-addressed store, hash-verified

82
83// StringWithFlags returns the AST formatted as a string (with the given flags).
84func (stmts Statements) StringWithFlags(flags tree.FmtFlags) string {
85 ctx := tree.NewFmtCtx(flags)
86 for i, s := range stmts {
87 if i > 0 {
88 ctx.WriteString("; ")
89 }
90 ctx.FormatNode(s.AST)
91 }
92 return ctx.CloseAndGetString()
93}
94
95// Parser wraps a scanner, parser and other utilities present in the parser
96// package.

Callers 1

StringMethod · 0.95

Calls 4

FormatNodeMethod · 0.95
CloseAndGetStringMethod · 0.95
NewFmtCtxFunction · 0.92
WriteStringMethod · 0.80

Tested by

no test coverage detected