MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / Detach_stmt

Method Detach_stmt

internal/engine/sqlite/parser/sqlite_parser.go:11848–11892  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11846}
11847
11848func (p *SQLiteParser) Detach_stmt() (localctx IDetach_stmtContext) {
11849 localctx = NewDetach_stmtContext(p, p.GetParserRuleContext(), p.GetState())
11850 p.EnterRule(localctx, 64, SQLiteParserRULE_detach_stmt)
11851 p.EnterOuterAlt(localctx, 1)
11852 {
11853 p.SetState(897)
11854 p.Match(SQLiteParserDETACH_)
11855 if p.HasError() {
11856 // Recognition error - abort rule
11857 goto errorExit
11858 }
11859 }
11860 p.SetState(899)
11861 p.GetErrorHandler().Sync(p)
11862
11863 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 113, p.GetParserRuleContext()) == 1 {
11864 {
11865 p.SetState(898)
11866 p.Match(SQLiteParserDATABASE_)
11867 if p.HasError() {
11868 // Recognition error - abort rule
11869 goto errorExit
11870 }
11871 }
11872
11873 } else if p.HasError() { // JIM
11874 goto errorExit
11875 }
11876 {
11877 p.SetState(901)
11878 p.Schema_name()
11879 }
11880
11881errorExit:
11882 if p.HasError() {
11883 v := p.GetError()
11884 localctx.SetException(v)
11885 p.GetErrorHandler().ReportError(p, v)
11886 p.GetErrorHandler().Recover(p, v)
11887 p.SetError(nil)
11888 }
11889 p.ExitRule()
11890 return localctx
11891 goto errorExit // Trick to prevent compiler error if the label is not used
11892}
11893
11894// IDrop_stmtContext is an interface to support dynamic dispatch.
11895type IDrop_stmtContext interface {

Callers 1

Sql_stmtMethod · 0.95

Calls 4

Schema_nameMethod · 0.95
NewDetach_stmtContextFunction · 0.85
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected