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

Method NamedQuery

query/sql/antlrgen/sqlbase_parser.go:3053–3111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3051}
3052
3053func (p *SqlBaseParser) NamedQuery() (localctx INamedQueryContext) {
3054 localctx = NewNamedQueryContext(p, p.GetParserRuleContext(), p.GetState())
3055 p.EnterRule(localctx, 22, SqlBaseParserRULE_namedQuery)
3056 var _la int
3057
3058 defer func() {
3059 p.ExitRule()
3060 }()
3061
3062 defer func() {
3063 if err := recover(); err != nil {
3064 if v, ok := err.(antlr.RecognitionException); ok {
3065 localctx.SetException(v)
3066 p.GetErrorHandler().ReportError(p, v)
3067 p.GetErrorHandler().Recover(p, v)
3068 } else {
3069 panic(err)
3070 }
3071 }
3072 }()
3073
3074 p.EnterOuterAlt(localctx, 1)
3075 {
3076 p.SetState(236)
3077
3078 var _x = p.Identifier()
3079
3080 localctx.(*NamedQueryContext).name = _x
3081 }
3082 p.SetState(238)
3083 p.GetErrorHandler().Sync(p)
3084 _la = p.GetTokenStream().LA(1)
3085
3086 if _la == SqlBaseParserT__1 {
3087 {
3088 p.SetState(237)
3089 p.ColumnAliases()
3090 }
3091
3092 }
3093 {
3094 p.SetState(240)
3095 p.Match(SqlBaseParserAS)
3096 }
3097 {
3098 p.SetState(241)
3099 p.Match(SqlBaseParserT__1)
3100 }
3101 {
3102 p.SetState(242)
3103 p.Query()
3104 }
3105 {
3106 p.SetState(243)
3107 p.Match(SqlBaseParserT__2)
3108 }
3109
3110 return localctx

Callers 1

WithMethod · 0.95

Calls 6

IdentifierMethod · 0.95
ColumnAliasesMethod · 0.95
QueryMethod · 0.95
NewNamedQueryContextFunction · 0.85
LAMethod · 0.80
ReportErrorMethod · 0.65

Tested by

no test coverage detected