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

Method WalkLiteralQuery

plan/planner_select.go:267–286  ·  view source on GitHub ↗

WalkLiteralQuery Handle Literal queries such as "SELECT 1, @var;"

(p *Select)

Source from the content-addressed store, hash-verified

265
266// WalkLiteralQuery Handle Literal queries such as "SELECT 1, @var;"
267func (m *PlannerDefault) WalkLiteralQuery(p *Select) error {
268 //u.Debugf("WalkLiteralQuery %+v", p.Stmt)
269 // Must project and possibly where
270
271 if p.Stmt.Where != nil {
272 u.Warnf("select literal where not implemented")
273 // the reason this is wrong is that the Source task gets
274 // added in the WalkProjectionFinal below and the Where would need to be in the
275 // middle of the Source -> Where -> Projection tasks
276 }
277
278 err := m.WalkProjectionFinal(p)
279
280 //u.Debugf("m.Ctx: %p m.Ctx.Projection.Proj:%p ", m.Ctx, m.Ctx.Projection.Proj)
281 if err != nil {
282 u.Errorf("error projecting literal? %#v", err)
283 return err
284 }
285 return nil
286}

Callers 1

WalkSelectMethod · 0.95

Calls 2

WalkProjectionFinalMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected