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

Function eval

datasource/sqlite/sqlrewrite.go:367–380  ·  view source on GitHub ↗
(cur expr.Node)

Source from the content-addressed store, hash-verified

365}
366
367func eval(cur expr.Node) (value.Value, bool) {
368 switch curNode := cur.(type) {
369 case *expr.IdentityNode:
370 if curNode.IsBooleanIdentity() {
371 return value.NewBoolValue(curNode.Bool()), true
372 }
373 return value.NewStringValue(curNode.Text), true
374 case *expr.StringNode:
375 return value.NewStringValue(curNode.Text), true
376 default:
377 //u.Errorf("unrecognized T:%T %v", cur, cur)
378 }
379 return value.NilValueVal, false
380}

Callers

nothing calls this directly

Calls 4

NewBoolValueFunction · 0.92
NewStringValueFunction · 0.92
IsBooleanIdentityMethod · 0.80
BoolMethod · 0.80

Tested by

no test coverage detected