MCPcopy
hub / github.com/pingcap/tidb / Apply

Method Apply

pkg/expression/exprstatic/exprctx.go:193–203  ·  view source on GitHub ↗

Apply returns a new `ExprContext` with the fields updated according to the given options.

(opts ...ExprCtxOption)

Source from the content-addressed store, hash-verified

191
192// Apply returns a new `ExprContext` with the fields updated according to the given options.
193func (ctx *ExprContext) Apply(opts ...ExprCtxOption) *ExprContext {
194 newCtx := &ExprContext{
195 exprCtxState: ctx.exprCtxState,
196 }
197
198 for _, opt := range opts {
199 opt(&newCtx.exprCtxState)
200 }
201
202 return newCtx
203}
204
205// GetEvalCtx implements the `ExprContext.GetEvalCtx`.
206func (ctx *ExprContext) GetEvalCtx() exprctx.EvalContext {

Callers 5

TestBuildExpressionFunction · 0.95
newLitExprContextFunction · 0.95

Calls 1

optStruct · 0.85

Tested by 3

TestBuildExpressionFunction · 0.76