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

Function PutAlterStatement

pkg/sql/ast/pool.go:1802–1812  ·  view source on GitHub ↗

PutAlterStatement returns an AlterStatement to the pool. It zeroes all fields; the Operation interface value is cleared but its internal allocations are not recursively pooled (they use custom types).

(stmt *AlterStatement)

Source from the content-addressed store, hash-verified

1800// It zeroes all fields; the Operation interface value is cleared but
1801// its internal allocations are not recursively pooled (they use custom types).
1802func PutAlterStatement(stmt *AlterStatement) {
1803 if stmt == nil {
1804 return
1805 }
1806
1807 stmt.Type = 0
1808 stmt.Name = ""
1809 stmt.Operation = nil
1810
1811 alterStmtPool.Put(stmt)
1812}
1813
1814// NewCreateSequenceStatement retrieves a CreateSequenceStatement from the pool.
1815func NewCreateSequenceStatement() *CreateSequenceStatement {

Callers 2

releaseStatementFunction · 0.85
TestAlterStatementPoolFunction · 0.85

Calls 1

PutMethod · 0.80

Tested by 1

TestAlterStatementPoolFunction · 0.68