MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / NewAST

Function NewAST

pkg/sql/ast/pool.go:411–414  ·  view source on GitHub ↗

NewAST retrieves a new AST container from the pool. NewAST returns a pooled AST container with pre-allocated statement capacity. This is the primary entry point for creating AST objects with memory pooling. Usage Pattern (MANDATORY): astObj := ast.NewAST() defer ast.ReleaseAST(astObj) // ALWAY

()

Source from the content-addressed store, hash-verified

409//
410// See also: ReleaseAST(), GetSelectStatement(), GetInsertStatement()
411func NewAST() *AST {
412 metrics.RecordNamedPoolGet("ast")
413 return astPool.Get().(*AST)
414}
415
416// ReleaseAST returns an AST container to the pool for reuse.
417//

Calls 2

RecordNamedPoolGetFunction · 0.92
GetMethod · 0.45