WithNoopFuncsMode sets the noop funcs mode for `ExprContext`.
(mode int)
| 89 | |
| 90 | // WithNoopFuncsMode sets the noop funcs mode for `ExprContext`. |
| 91 | func WithNoopFuncsMode(mode int) ExprCtxOption { |
| 92 | intest.Assert(mode == variable.OnInt || mode == variable.OffInt || mode == variable.WarnInt) |
| 93 | return func(s *exprCtxState) { |
| 94 | s.noopFuncsMode = mode |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | // WithRng sets the rng for `ExprContext`. |
| 99 | func WithRng(rng *mathutil.MysqlRng) ExprCtxOption { |