MCPcopy
hub / github.com/uber/aresdb / VisitBooleanDefault

Method VisitBooleanDefault

query/sql/sql_parser.go:703–723  ·  view source on GitHub ↗

VisitBooleanDefault visits the node

(ctx *antlrgen.BooleanDefaultContext)

Source from the content-addressed store, hash-verified

701
702// VisitBooleanDefault visits the node
703func (v *ASTBuilder) VisitBooleanDefault(ctx *antlrgen.BooleanDefaultContext) interface{} {
704 if v.SQL2AqlCtx.exprCheck {
705 v.Logger.Debugf("VisitBooleanDefault check: %s", ctx.GetText())
706 return v.VisitChildren(ctx)
707 }
708
709 v.Logger.Debugf("VisitBooleanDefault: %s", ctx.GetText())
710 if v.SQL2AqlCtx.exprOrigin == ExprOriginWhere && !strings.HasPrefix(v.getText(ctx), _aqlPrefix) {
711 v.SQL2AqlCtx.MapRowFilters[v.SQL2AqlCtx.mapKey] =
712 append(v.SQL2AqlCtx.MapRowFilters[v.SQL2AqlCtx.mapKey], v.getText(ctx.BaseParserRuleContext))
713 } else if v.SQL2AqlCtx.exprOrigin == ExprOriginJoinOn {
714 last := len(v.SQL2AqlCtx.MapJoinTables[v.SQL2AqlCtx.mapKey]) - 1
715 v.SQL2AqlCtx.MapJoinTables[v.SQL2AqlCtx.mapKey][last].Conditions =
716 append(v.SQL2AqlCtx.MapJoinTables[v.SQL2AqlCtx.mapKey][last].Conditions, v.getText(ctx.BaseParserRuleContext))
717 }
718
719 expr := tree.NewExpression(v.getLocation(ctx))
720 expr.SetValue(fmt.Sprintf("BooleanDefault: (%s)", v.getText(ctx.BaseParserRuleContext)))
721
722 return expr
723}
724
725// VisitLogicalNot visits the node
726func (v *ASTBuilder) VisitLogicalNot(ctx *antlrgen.LogicalNotContext) interface{} {

Callers

nothing calls this directly

Calls 6

VisitChildrenMethod · 0.95
getTextMethod · 0.95
getLocationMethod · 0.95
NewExpressionFunction · 0.92
DebugfMethod · 0.65
SetValueMethod · 0.65

Tested by

no test coverage detected