MCPcopy
hub / github.com/sqlc-dev/sqlc / Alter_table_stmt

Method Alter_table_stmt

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

Source from the content-addressed store, hash-verified

2905}
2906
2907func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) {
2908 localctx = NewAlter_table_stmtContext(p, p.GetParserRuleContext(), p.GetState())
2909 p.EnterRule(localctx, 6, SQLiteParserRULE_alter_table_stmt)
2910 p.EnterOuterAlt(localctx, 1)
2911 {
2912 p.SetState(295)
2913 p.Match(SQLiteParserALTER_)
2914 if p.HasError() {
2915 // Recognition error - abort rule
2916 goto errorExit
2917 }
2918 }
2919 {
2920 p.SetState(296)
2921 p.Match(SQLiteParserTABLE_)
2922 if p.HasError() {
2923 // Recognition error - abort rule
2924 goto errorExit
2925 }
2926 }
2927 p.SetState(300)
2928 p.GetErrorHandler().Sync(p)
2929
2930 if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext()) == 1 {
2931 {
2932 p.SetState(297)
2933 p.Schema_name()
2934 }
2935 {
2936 p.SetState(298)
2937 p.Match(SQLiteParserDOT)
2938 if p.HasError() {
2939 // Recognition error - abort rule
2940 goto errorExit
2941 }
2942 }
2943
2944 } else if p.HasError() { // JIM
2945 goto errorExit
2946 }
2947 {
2948 p.SetState(302)
2949 p.Table_name()
2950 }
2951 p.SetState(325)
2952 p.GetErrorHandler().Sync(p)
2953 if p.HasError() {
2954 goto errorExit
2955 }
2956
2957 switch p.GetTokenStream().LA(1) {
2958 case SQLiteParserRENAME_:
2959 {
2960 p.SetState(303)
2961 p.Match(SQLiteParserRENAME_)
2962 if p.HasError() {
2963 // Recognition error - abort rule
2964 goto errorExit

Callers 1

Sql_stmtMethod · 0.95

Calls 8

Schema_nameMethod · 0.95
Table_nameMethod · 0.95
New_table_nameMethod · 0.95
Column_nameMethod · 0.95
Column_defMethod · 0.95
EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected