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

Method VisitDereference

query/sql/sql_parser.go:1043–1058  ·  view source on GitHub ↗

VisitDereference visits the node

(ctx *antlrgen.DereferenceContext)

Source from the content-addressed store, hash-verified

1041
1042// VisitDereference visits the node
1043func (v *ASTBuilder) VisitDereference(ctx *antlrgen.DereferenceContext) interface{} {
1044 v.Logger.Debugf("VisitDereference: %s", ctx.GetText())
1045
1046 location := v.getLocation(ctx.GetBase())
1047 if v.SQL2AqlCtx.mapKey == 0 {
1048 // reject the expression if subquery/withQuery identifier is used in level 0 query
1049 primaryExpr := v.getText(ctx.GetBase())
1050 key := v.isSubOrWithQueryIdentifier(v.SQL2AqlCtx, primaryExpr)
1051 if key > 0 {
1052 panic(fmt.Errorf("subquery/withQuery identifier in expression not supported yet. (line:%d, col:%d)",
1053 location.Line, location.CharPosition))
1054 }
1055 }
1056
1057 return v.VisitChildren(ctx)
1058}
1059
1060// ***************** Reserved *****************
1061

Callers

nothing calls this directly

Calls 7

getLocationMethod · 0.95
getTextMethod · 0.95
VisitChildrenMethod · 0.95
GetBaseMethod · 0.80
DebugfMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected