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

Method QueryPrimary

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

Source from the content-addressed store, hash-verified

1892}
1893
1894func (p *SqlBaseParser) QueryPrimary() (localctx IQueryPrimaryContext) {
1895 localctx = NewQueryPrimaryContext(p, p.GetParserRuleContext(), p.GetState())
1896 p.EnterRule(localctx, 10, SqlBaseParserRULE_queryPrimary)
1897
1898 defer func() {
1899 p.ExitRule()
1900 }()
1901
1902 defer func() {
1903 if err := recover(); err != nil {
1904 if v, ok := err.(antlr.RecognitionException); ok {
1905 localctx.SetException(v)
1906 p.GetErrorHandler().ReportError(p, v)
1907 p.GetErrorHandler().Recover(p, v)
1908 } else {
1909 panic(err)
1910 }
1911 }
1912 }()
1913
1914 var _alt int
1915
1916 p.SetState(162)
1917 p.GetErrorHandler().Sync(p)
1918
1919 switch p.GetTokenStream().LA(1) {
1920 case SqlBaseParserSELECT:
1921 localctx = NewQueryPrimaryDefaultContext(p, localctx)
1922 p.EnterOuterAlt(localctx, 1)
1923 {
1924 p.SetState(146)
1925 p.QuerySpecification()
1926 }
1927
1928 case SqlBaseParserTABLE:
1929 localctx = NewTableContext(p, localctx)
1930 p.EnterOuterAlt(localctx, 2)
1931 {
1932 p.SetState(147)
1933 p.Match(SqlBaseParserTABLE)
1934 }
1935 {
1936 p.SetState(148)
1937 p.QualifiedName()
1938 }
1939
1940 case SqlBaseParserVALUES:
1941 localctx = NewInlineTableContext(p, localctx)
1942 p.EnterOuterAlt(localctx, 3)
1943 {
1944 p.SetState(149)
1945 p.Match(SqlBaseParserVALUES)
1946 }
1947 {
1948 p.SetState(150)
1949 p.Expression()
1950 }
1951 p.SetState(155)

Callers 1

queryTermMethod · 0.95

Calls 11

QuerySpecificationMethod · 0.95
QualifiedNameMethod · 0.95
ExpressionMethod · 0.95
QueryNoWithMethod · 0.95
NewQueryPrimaryContextFunction · 0.85
NewTableContextFunction · 0.85
NewInlineTableContextFunction · 0.85
NewSubqueryContextFunction · 0.85
LAMethod · 0.80
ReportErrorMethod · 0.65

Tested by

no test coverage detected