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

Method RelationPrimary

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

Source from the content-addressed store, hash-verified

4834}
4835
4836func (p *SqlBaseParser) RelationPrimary() (localctx IRelationPrimaryContext) {
4837 localctx = NewRelationPrimaryContext(p, p.GetParserRuleContext(), p.GetState())
4838 p.EnterRule(localctx, 42, SqlBaseParserRULE_relationPrimary)
4839
4840 defer func() {
4841 p.ExitRule()
4842 }()
4843
4844 defer func() {
4845 if err := recover(); err != nil {
4846 if v, ok := err.(antlr.RecognitionException); ok {
4847 localctx.SetException(v)
4848 p.GetErrorHandler().ReportError(p, v)
4849 p.GetErrorHandler().Recover(p, v)
4850 } else {
4851 panic(err)
4852 }
4853 }
4854 }()
4855
4856 p.SetState(359)
4857 p.GetErrorHandler().Sync(p)
4858 switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 44, p.GetParserRuleContext()) {
4859 case 1:
4860 localctx = NewTableNameContext(p, localctx)
4861 p.EnterOuterAlt(localctx, 1)
4862 {
4863 p.SetState(350)
4864 p.QualifiedName()
4865 }
4866
4867 case 2:
4868 localctx = NewSubqueryRelationContext(p, localctx)
4869 p.EnterOuterAlt(localctx, 2)
4870 {
4871 p.SetState(351)
4872 p.Match(SqlBaseParserT__1)
4873 }
4874 {
4875 p.SetState(352)
4876 p.Query()
4877 }
4878 {
4879 p.SetState(353)
4880 p.Match(SqlBaseParserT__2)
4881 }
4882
4883 case 3:
4884 localctx = NewParenthesizedRelationContext(p, localctx)
4885 p.EnterOuterAlt(localctx, 3)
4886 {
4887 p.SetState(355)
4888 p.Match(SqlBaseParserT__1)
4889 }
4890 {
4891 p.SetState(356)
4892 p.relation(0)
4893 }

Callers 2

AliasedRelationMethod · 0.95
VisitAliasedRelationMethod · 0.45

Calls 8

QualifiedNameMethod · 0.95
QueryMethod · 0.95
relationMethod · 0.95
NewTableNameContextFunction · 0.85
ReportErrorMethod · 0.65

Tested by

no test coverage detected