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

Function WithCurrentDB

pkg/expression/exprstatic/evalctx.go:138–142  ·  view source on GitHub ↗

WithCurrentDB sets the current database name for the `EvalContext`.

(db string)

Source from the content-addressed store, hash-verified

136
137// WithCurrentDB sets the current database name for the `EvalContext`.
138func WithCurrentDB(db string) EvalCtxOption {
139 return func(s *evalCtxState) {
140 s.currentDB = db
141 }
142}
143
144// WithCurrentTime sets the current time for the `EvalContext`.
145func WithCurrentTime(fn func() (time.Time, error)) EvalCtxOption {

Callers 3

getEvalCtxOptionsForTestFunction · 0.85
MakeEvalContextStaticFunction · 0.85

Calls

no outgoing calls

Tested by 2

getEvalCtxOptionsForTestFunction · 0.68