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

Method Commit_stmt

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

Source from the content-addressed store, hash-verified

3721}
3722
3723func (p *SQLiteParser) Commit_stmt() (localctx ICommit_stmtContext) {
3724 localctx = NewCommit_stmtContext(p, p.GetParserRuleContext(), p.GetState())
3725 p.EnterRule(localctx, 14, SQLiteParserRULE_commit_stmt)
3726 var _la int
3727
3728 p.EnterOuterAlt(localctx, 1)
3729 {
3730 p.SetState(355)
3731 _la = p.GetTokenStream().LA(1)
3732
3733 if !(_la == SQLiteParserCOMMIT_ || _la == SQLiteParserEND_) {
3734 p.GetErrorHandler().RecoverInline(p)
3735 } else {
3736 p.GetErrorHandler().ReportMatch(p)
3737 p.Consume()
3738 }
3739 }
3740 p.SetState(357)
3741 p.GetErrorHandler().Sync(p)
3742 if p.HasError() {
3743 goto errorExit
3744 }
3745 _la = p.GetTokenStream().LA(1)
3746
3747 if _la == SQLiteParserTRANSACTION_ {
3748 {
3749 p.SetState(356)
3750 p.Match(SQLiteParserTRANSACTION_)
3751 if p.HasError() {
3752 // Recognition error - abort rule
3753 goto errorExit
3754 }
3755 }
3756
3757 }
3758
3759errorExit:
3760 if p.HasError() {
3761 v := p.GetError()
3762 localctx.SetException(v)
3763 p.GetErrorHandler().ReportError(p, v)
3764 p.GetErrorHandler().Recover(p, v)
3765 p.SetError(nil)
3766 }
3767 p.ExitRule()
3768 return localctx
3769 goto errorExit // Trick to prevent compiler error if the label is not used
3770}
3771
3772// IRollback_stmtContext is an interface to support dynamic dispatch.
3773type IRollback_stmtContext interface {

Callers 1

Sql_stmtMethod · 0.95

Calls 3

NewCommit_stmtContextFunction · 0.85
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected