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

Method VisitLogicalNot

query/sql/sql_parser.go:726–747  ·  view source on GitHub ↗

VisitLogicalNot visits the node

(ctx *antlrgen.LogicalNotContext)

Source from the content-addressed store, hash-verified

724
725// VisitLogicalNot visits the node
726func (v *ASTBuilder) VisitLogicalNot(ctx *antlrgen.LogicalNotContext) interface{} {
727 v.Logger.Debugf("VisitLogicalNot check: %s", ctx.GetText())
728
729 if v.SQL2AqlCtx.exprCheck {
730 return v.VisitChildren(ctx)
731 }
732
733 v.Logger.Debugf("VisitLogicalNot: %s", ctx.GetText())
734 if v.SQL2AqlCtx.exprOrigin == ExprOriginWhere {
735 v.SQL2AqlCtx.MapRowFilters[v.SQL2AqlCtx.mapKey] =
736 append(v.SQL2AqlCtx.MapRowFilters[v.SQL2AqlCtx.mapKey], v.getText(ctx.BaseParserRuleContext))
737 } else if v.SQL2AqlCtx.exprOrigin == ExprOriginJoinOn {
738 last := len(v.SQL2AqlCtx.MapJoinTables[v.SQL2AqlCtx.mapKey]) - 1
739 v.SQL2AqlCtx.MapJoinTables[v.SQL2AqlCtx.mapKey][last].Conditions =
740 append(v.SQL2AqlCtx.MapJoinTables[v.SQL2AqlCtx.mapKey][last].Conditions, v.getText(ctx.BaseParserRuleContext))
741 }
742
743 expr := tree.NewExpression(v.getLocation(ctx))
744 expr.SetValue(fmt.Sprintf("LogicalNot: (%s)", v.getText(ctx.BaseParserRuleContext)))
745
746 return expr
747}
748
749// *************** from clause *****************
750

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