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

Function PutLiteralValue

pkg/sql/ast/pool.go:777–788  ·  view source on GitHub ↗

PutLiteralValue returns a LiteralValue to the pool

(lit *LiteralValue)

Source from the content-addressed store, hash-verified

775
776// PutLiteralValue returns a LiteralValue to the pool
777func PutLiteralValue(lit *LiteralValue) {
778 if lit == nil {
779 return
780 }
781
782 // Reset fields (Value is interface{}, use nil as zero value)
783 lit.Value = nil
784 lit.Type = ""
785
786 // Return to pool
787 literalValuePool.Put(lit)
788}
789
790// PutExpression returns any Expression to the appropriate pool with iterative cleanup.
791//

Callers 4

TestLiteralValuePoolingFunction · 0.85
TestLiteralValuePoolFunction · 0.85
TestPoolReuseFunction · 0.85

Calls 1

PutMethod · 0.80

Tested by 4

TestLiteralValuePoolingFunction · 0.68
TestLiteralValuePoolFunction · 0.68
TestPoolReuseFunction · 0.68