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

Function NewFmtCtxEx

postgres/parser/sem/tree/format.go:280–288  ·  view source on GitHub ↗

NewFmtCtxEx creates a FmtCtx.

(f FmtFlags, ann *Annotations)

Source from the content-addressed store, hash-verified

278
279// NewFmtCtxEx creates a FmtCtx.
280func NewFmtCtxEx(f FmtFlags, ann *Annotations) *FmtCtx {
281 if ann == nil && f&flagsRequiringAnnotations != 0 {
282 panic(errors.AssertionFailedf("no Annotations provided"))
283 }
284 ctx := fmtCtxPool.Get().(*FmtCtx)
285 ctx.flags = f
286 ctx.ann = ann
287 return ctx
288}
289
290// SetReformatTableNames modifies FmtCtx to to substitute the printing of table
291// names using the provided function.

Callers 2

NewFmtCtxFunction · 0.85
AsStringWithFQNamesFunction · 0.85

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected