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

Function PutCreateIndexStatement

pkg/sql/ast/pool.go:1521–1544  ·  view source on GitHub ↗

PutCreateIndexStatement returns a CreateIndexStatement to the pool. It releases the optional WHERE expression.

(stmt *CreateIndexStatement)

Source from the content-addressed store, hash-verified

1519// PutCreateIndexStatement returns a CreateIndexStatement to the pool.
1520// It releases the optional WHERE expression.
1521func PutCreateIndexStatement(stmt *CreateIndexStatement) {
1522 if stmt == nil {
1523 return
1524 }
1525
1526 PutExpression(stmt.Where)
1527
1528 for i := range stmt.Columns {
1529 stmt.Columns[i].Column = ""
1530 stmt.Columns[i].Collate = ""
1531 stmt.Columns[i].Direction = ""
1532 stmt.Columns[i].NullsLast = false
1533 }
1534 stmt.Columns = stmt.Columns[:0]
1535
1536 stmt.Where = nil
1537 stmt.Unique = false
1538 stmt.IfNotExists = false
1539 stmt.Name = ""
1540 stmt.Table = ""
1541 stmt.Using = ""
1542
1543 createIndexStmtPool.Put(stmt)
1544}
1545
1546// GetMergeStatement gets a MergeStatement from the pool.
1547func GetMergeStatement() *MergeStatement {

Callers 3

releaseStatementFunction · 0.85

Calls 2

PutExpressionFunction · 0.85
PutMethod · 0.80

Tested by 2