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

Method VisitSelectSingle

query/sql/sql_parser.go:536–548  ·  view source on GitHub ↗

VisitSelectSingle visits the node

(ctx *antlrgen.SelectSingleContext)

Source from the content-addressed store, hash-verified

534
535// VisitSelectSingle visits the node
536func (v *ASTBuilder) VisitSelectSingle(ctx *antlrgen.SelectSingleContext) interface{} {
537 v.Logger.Debugf("VisitSelectSingle: %s", ctx.GetText())
538
539 v.SQL2AqlCtx.exprCheck = true
540 v.Visit(ctx.Expression())
541 v.SQL2AqlCtx.exprCheck = false
542 expr, _ := v.Visit(ctx.Expression()).(tree.IExpression)
543 singleColumn := tree.NewSingleColumn(v.getLocation(ctx),
544 expr,
545 v.visitIfPresent(ctx.Identifier(), reflect.TypeOf((*tree.Identifier)(nil))).(*tree.Identifier))
546 singleColumn.SetValue(fmt.Sprintf("SingleColumn: (%s)", v.getText(ctx.BaseParserRuleContext)))
547 return singleColumn
548}
549
550// VisitGroupBy visits the node
551func (v *ASTBuilder) VisitGroupBy(ctx *antlrgen.GroupByContext) interface{} {

Callers

nothing calls this directly

Calls 9

VisitMethod · 0.95
getLocationMethod · 0.95
visitIfPresentMethod · 0.95
getTextMethod · 0.95
NewSingleColumnFunction · 0.92
DebugfMethod · 0.65
SetValueMethod · 0.65
ExpressionMethod · 0.45
IdentifierMethod · 0.45

Tested by

no test coverage detected