MCPcopy Create free account
hub / github.com/araddon/qlbridge / SetContextToMockCsv

Function SetContextToMockCsv

datasource/mockcsvtestdata/testdata.go:22–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20)
21
22func SetContextToMockCsv() {
23 TestContext = func(query string) *plan.Context {
24 ctx := plan.NewContext(query)
25 ctx.DisableRecover = true
26 ctx.Schema = MockSchema
27 ctx.Session = datasource.NewMySqlSessionVars()
28 return ctx
29 }
30}
31
32func SchemaLoader(name string) (*schema.Schema, error) {
33 return MockSchema, nil

Callers 1

LoadTestDataOnceFunction · 0.85

Calls 2

NewContextFunction · 0.92
NewMySqlSessionVarsFunction · 0.92

Tested by

no test coverage detected