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

Method VisitChildren

query/sql/sql_parser.go:172–187  ·  view source on GitHub ↗

VisitChildren visits the node

(node antlr.RuleNode)

Source from the content-addressed store, hash-verified

170
171// VisitChildren visits the node
172func (v *ASTBuilder) VisitChildren(node antlr.RuleNode) interface{} {
173 result := v.defaultResult()
174 if !reflect.ValueOf(node).IsNil() {
175 n := node.GetChildCount()
176 for i := 0; i < n && v.shouldVisitNextChild(node, result); i++ {
177 var c antlr.ParseTree
178 c = node.GetChild(i).(antlr.ParseTree)
179 childResult := c.Accept(v)
180 if v.SQL2AqlCtx.exprCheck == false {
181 result = v.aggregateResult(c, result, childResult)
182 }
183 }
184 }
185
186 return result
187}
188
189func (v *ASTBuilder) visitIfPresent(ctx antlr.RuleContext, visitResult reflect.Type) interface{} {
190 if ctx == nil {

Callers 15

VisitExpressionMethod · 0.95
VisitBooleanDefaultMethod · 0.95
VisitLogicalNotMethod · 0.95
VisitDereferenceMethod · 0.95
VisitStatementDefaultMethod · 0.95
VisitQueryTermDefaultMethod · 0.95
VisitSetQuantifierMethod · 0.95
VisitRelationDefaultMethod · 0.95
VisitJoinTypeMethod · 0.95
VisitJoinCriteriaMethod · 0.95

Calls 5

defaultResultMethod · 0.95
shouldVisitNextChildMethod · 0.95
aggregateResultMethod · 0.95
IsNilMethod · 0.80
AcceptMethod · 0.65

Tested by

no test coverage detected