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

Function PutCaseExpression

pkg/sql/ast/pool.go:1157–1171  ·  view source on GitHub ↗

PutCaseExpression returns a CaseExpression to the pool

(ce *CaseExpression)

Source from the content-addressed store, hash-verified

1155
1156// PutCaseExpression returns a CaseExpression to the pool
1157func PutCaseExpression(ce *CaseExpression) {
1158 if ce == nil {
1159 return
1160 }
1161 PutExpression(ce.Value)
1162 ce.Value = nil
1163 for i := range ce.WhenClauses {
1164 PutExpression(ce.WhenClauses[i].Condition)
1165 PutExpression(ce.WhenClauses[i].Result)
1166 }
1167 ce.WhenClauses = ce.WhenClauses[:0]
1168 PutExpression(ce.ElseClause)
1169 ce.ElseClause = nil
1170 caseExprPool.Put(ce)
1171}
1172
1173// GetBetweenExpression gets a BetweenExpression from the pool
1174func GetBetweenExpression() *BetweenExpression {

Callers 1

TestPutCaseExpressionFunction · 0.85

Calls 2

PutExpressionFunction · 0.85
PutMethod · 0.80

Tested by 1

TestPutCaseExpressionFunction · 0.68