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

Method Close

pkg/sql/sem/tree/format.go:420–427  ·  view source on GitHub ↗

Close releases a FmtCtx for reuse. Closing a FmtCtx is not required, but is recommended for performance-sensitive paths.

()

Source from the content-addressed store, hash-verified

418// Close releases a FmtCtx for reuse. Closing a FmtCtx is not required, but is
419// recommended for performance-sensitive paths.
420func (ctx *FmtCtx) Close() {
421 ctx.Buffer.Reset()
422 ctx.flags = 0
423 ctx.indexedVarFormat = nil
424 ctx.tableNameFormatter = nil
425 ctx.placeholderFormat = nil
426 fmtCtxPool.Put(ctx)
427}
428
429// CloseAndGetString combines Close() and String().
430func (ctx *FmtCtx) CloseAndGetString() string {

Callers 1

CloseAndGetStringMethod · 0.95

Calls 1

ResetMethod · 0.65

Tested by

no test coverage detected