diff --git a/ast/ast.go b/ast/ast.go index 295b21b4..58da5d31 100644 --- a/ast/ast.go +++ b/ast/ast.go @@ -245,22 +245,22 @@ type Constraint interface { func (ForeignKey) isConstraint() {} func (Check) isConstraint() {} -// TableAlternation represents ALTER TABLE action. -type TableAlternation interface { +// TableAlteration represents ALTER TABLE action. +type TableAlteration interface { Node - isTableAlternation() + isTableAlteration() } -func (AddColumn) isTableAlternation() {} -func (AddTableConstraint) isTableAlternation() {} -func (AddRowDeletionPolicy) isTableAlternation() {} -func (DropColumn) isTableAlternation() {} -func (DropConstraint) isTableAlternation() {} -func (DropRowDeletionPolicy) isTableAlternation() {} -func (ReplaceRowDeletionPolicy) isTableAlternation() {} -func (SetOnDelete) isTableAlternation() {} -func (AlterColumn) isTableAlternation() {} -func (AlterColumnSet) isTableAlternation() {} +func (AddColumn) isTableAlteration() {} +func (AddTableConstraint) isTableAlteration() {} +func (AddRowDeletionPolicy) isTableAlteration() {} +func (DropColumn) isTableAlteration() {} +func (DropConstraint) isTableAlteration() {} +func (DropRowDeletionPolicy) isTableAlteration() {} +func (ReplaceRowDeletionPolicy) isTableAlteration() {} +func (SetOnDelete) isTableAlteration() {} +func (AlterColumn) isTableAlteration() {} +func (AlterColumnSet) isTableAlteration() {} // Privilege represents privileges specified by GRANT and REVOKE. type Privilege interface { @@ -294,14 +294,14 @@ func (ScalarSchemaType) isSchemaType() {} func (SizedSchemaType) isSchemaType() {} func (ArraySchemaType) isSchemaType() {} -// IndexAlternation represents ALTER INDEX action. -type IndexAlternation interface { +// IndexAlteration represents ALTER INDEX action. +type IndexAlteration interface { Node - isIndexAlternation() + isIndexAlteration() } -func (AddStoredColumn) isIndexAlternation() {} -func (DropStoredColumn) isIndexAlternation() {} +func (AddStoredColumn) isIndexAlteration() {} +func (DropStoredColumn) isIndexAlteration() {} // DML represents data manipulation language in SQL. // @@ -333,15 +333,15 @@ type ChangeStreamFor interface { func (ChangeStreamForAll) isChangeStreamFor() {} func (ChangeStreamForTables) isChangeStreamFor() {} -// ChangeStreamAlternation represents ALTER CHANGE STREAM action. -type ChangeStreamAlternation interface { +// ChangeStreamAlteration represents ALTER CHANGE STREAM action. +type ChangeStreamAlteration interface { Node - isChangeStreamAlternation() + isChangeStreamAlteration() } -func (ChangeStreamSetFor) isChangeStreamAlternation() {} -func (ChangeStreamDropForAll) isChangeStreamAlternation() {} -func (ChangeStreamSetOptions) isChangeStreamAlternation() {} +func (ChangeStreamSetFor) isChangeStreamAlteration() {} +func (ChangeStreamDropForAll) isChangeStreamAlteration() {} +func (ChangeStreamSetOptions) isChangeStreamAlteration() {} // ================================================================================ // @@ -1626,41 +1626,41 @@ type CreateView struct { // AlterTable is ALTER TABLE statement node. // -// ALTER TABLE {{.Name | sql}} {{.TableAlternation | sql}} +// ALTER TABLE {{.Name | sql}} {{.TableAlteration | sql}} type AlterTable struct { // pos = Alter - // end = TableAlternation.end + // end = TableAlteration.end Alter token.Pos // position of "ALTER" keyword Name *Ident - TableAlternation TableAlternation + TableAlteration TableAlteration } // AlterIndex is ALTER INDEX statement node. // -// ALTER INDEX {{.Name | sql}} {{.IndexAlternation | sql}} +// ALTER INDEX {{.Name | sql}} {{.IndexAlteration | sql}} type AlterIndex struct { // pos = Alter - // end = IndexAlternation.end + // end = IndexAlteration.end Alter token.Pos // position of "ALTER" keyword Name *Ident - IndexAlternation IndexAlternation + IndexAlteration IndexAlteration } // AlterChangeStream is ALTER CHANGE STREAM statement node. // -// ALTER CHANGE STREAM {{.Name | sql}} {{.ChangeStreamAlternation | sql}} +// ALTER CHANGE STREAM {{.Name | sql}} {{.ChangeStreamAlteration | sql}} type AlterChangeStream struct { // pos = Alter - // end = ChangeStreamAlternation.end + // end = ChangeStreamAlteration.end Alter token.Pos // position of "ALTER" keyword Name *Ident - ChangeStreamAlternation ChangeStreamAlternation + ChangeStreamAlteration ChangeStreamAlteration } // AddColumn is ADD COLUMN clause in ALTER TABLE. diff --git a/ast/ast_test.go b/ast/ast_test.go index c9c1f999..5199e2d7 100644 --- a/ast/ast_test.go +++ b/ast/ast_test.go @@ -142,14 +142,14 @@ func TestConstraint(t *testing.T) { Constraint(&Check{}).isConstraint() } -func TestTableAlternation(t *testing.T) { - TableAlternation(&AddColumn{}).isTableAlternation() - TableAlternation(&AddTableConstraint{}).isTableAlternation() - TableAlternation(&DropColumn{}).isTableAlternation() - TableAlternation(&DropConstraint{}).isTableAlternation() - TableAlternation(&SetOnDelete{}).isTableAlternation() - TableAlternation(&AlterColumn{}).isTableAlternation() - TableAlternation(&AlterColumnSet{}).isTableAlternation() +func TestTableAlteration(t *testing.T) { + TableAlteration(&AddColumn{}).isTableAlteration() + TableAlteration(&AddTableConstraint{}).isTableAlteration() + TableAlteration(&DropColumn{}).isTableAlteration() + TableAlteration(&DropConstraint{}).isTableAlteration() + TableAlteration(&SetOnDelete{}).isTableAlteration() + TableAlteration(&AlterColumn{}).isTableAlteration() + TableAlteration(&AlterColumnSet{}).isTableAlteration() } func TestPrivilege(t *testing.T) { @@ -172,9 +172,9 @@ func TestSchemaType(t *testing.T) { SchemaType(&ArraySchemaType{}).isSchemaType() } -func TestIndexAlternation(t *testing.T) { - IndexAlternation(&AddStoredColumn{}).isIndexAlternation() - IndexAlternation(&DropStoredColumn{}).isIndexAlternation() +func TestIndexAlteration(t *testing.T) { + IndexAlteration(&AddStoredColumn{}).isIndexAlteration() + IndexAlteration(&DropStoredColumn{}).isIndexAlteration() } func TestDML(t *testing.T) { diff --git a/ast/pos.go b/ast/pos.go index a6aaa402..0b2e0599 100644 --- a/ast/pos.go +++ b/ast/pos.go @@ -601,7 +601,7 @@ func (r *RowDeletionPolicy) End() token.Pos { } func (a *AlterTable) Pos() token.Pos { return a.Alter } -func (a *AlterTable) End() token.Pos { return a.TableAlternation.End() } +func (a *AlterTable) End() token.Pos { return a.TableAlteration.End() } func (a *AddColumn) Pos() token.Pos { return a.Add } func (a *AddColumn) End() token.Pos { return a.Column.End() } @@ -693,7 +693,7 @@ func (i *InterleaveIn) Pos() token.Pos { return i.Comma } func (i *InterleaveIn) End() token.Pos { return i.TableName.End() } func (a *AlterIndex) Pos() token.Pos { return a.Alter } -func (a *AlterIndex) End() token.Pos { return a.IndexAlternation.End() } +func (a *AlterIndex) End() token.Pos { return a.IndexAlteration.End() } func (a *AddStoredColumn) Pos() token.Pos { return a.Add } func (a *AddStoredColumn) End() token.Pos { return a.Name.End() } @@ -714,7 +714,7 @@ func (d *DropChangeStream) Pos() token.Pos { return d.Drop } func (d *DropChangeStream) End() token.Pos { return d.Name.End() } func (a *AlterChangeStream) Pos() token.Pos { return a.Alter } -func (a *AlterChangeStream) End() token.Pos { return a.ChangeStreamAlternation.End() } +func (a *AlterChangeStream) End() token.Pos { return a.ChangeStreamAlteration.End() } func (a *ChangeStreamSetFor) Pos() token.Pos { return a.Set } func (a *ChangeStreamSetFor) End() token.Pos { return a.For.End() } diff --git a/ast/pos_test.go b/ast/pos_test.go index 5e58dbde..48ebb94d 100644 --- a/ast/pos_test.go +++ b/ast/pos_test.go @@ -6,7 +6,7 @@ import ( "github.com/cloudspannerecosystem/memefish/token" ) -func TestTableAlternation_Position(t *testing.T) { +func TestTableAlteration_Position(t *testing.T) { alterColumnDefaultExpr := AlterColumn{ DefaultExpr: &ColumnDefaultExpr{Rparen: 100}, } diff --git a/ast/sql.go b/ast/sql.go index c31d71bc..4c94d30f 100644 --- a/ast/sql.go +++ b/ast/sql.go @@ -872,7 +872,7 @@ func (r *RowDeletionPolicy) SQL() string { } func (a *AlterTable) SQL() string { - return "ALTER TABLE " + a.Name.SQL() + " " + a.TableAlternation.SQL() + return "ALTER TABLE " + a.Name.SQL() + " " + a.TableAlteration.SQL() } func (a *AddColumn) SQL() string { @@ -1007,7 +1007,7 @@ func (c *ChangeStreamOptions) SQL() string { } func (a *AlterChangeStream) SQL() string { - return "ALTER CHANGE STREAM " + a.Name.SQL() + " " + a.ChangeStreamAlternation.SQL() + return "ALTER CHANGE STREAM " + a.Name.SQL() + " " + a.ChangeStreamAlteration.SQL() } func (a ChangeStreamSetFor) SQL() string { @@ -1058,7 +1058,7 @@ func (i *InterleaveIn) SQL() string { } func (a *AlterIndex) SQL() string { - return "ALTER INDEX " + a.Name.SQL() + " " + a.IndexAlternation.SQL() + return "ALTER INDEX " + a.Name.SQL() + " " + a.IndexAlteration.SQL() } func (a *AddStoredColumn) SQL() string { diff --git a/parser.go b/parser.go index 7648d90c..4978e766 100644 --- a/parser.go +++ b/parser.go @@ -2536,13 +2536,13 @@ func (p *Parser) parseAlterChangeStream(pos token.Pos) *ast.AlterChangeStream { setpos := p.Token.Pos p.nextToken() if p.Token.Kind == "FOR" { - cs.ChangeStreamAlternation = &ast.ChangeStreamSetFor{ + cs.ChangeStreamAlteration = &ast.ChangeStreamSetFor{ Set: setpos, For: p.parseChangeStreamFor(), } return cs } else if p.Token.IsKeywordLike("OPTIONS") { - cs.ChangeStreamAlternation = &ast.ChangeStreamSetOptions{ + cs.ChangeStreamAlteration = &ast.ChangeStreamSetOptions{ Set: setpos, Options: p.parseChangeStreamOptions(), } @@ -2553,7 +2553,7 @@ func (p *Parser) parseAlterChangeStream(pos token.Pos) *ast.AlterChangeStream { p.nextToken() p.expect("FOR") allpos := p.expect("ALL").Pos - cs.ChangeStreamAlternation = &ast.ChangeStreamDropForAll{ + cs.ChangeStreamAlteration = &ast.ChangeStreamDropForAll{ Drop: droppos, All: allpos, } @@ -2683,18 +2683,18 @@ func (p *Parser) parseAlterTable(pos token.Pos) *ast.AlterTable { p.expectKeywordLike("TABLE") name := p.parseIdent() - var alternation ast.TableAlternation + var alteration ast.TableAlteration switch { case p.Token.IsKeywordLike("ADD"): - alternation = p.parseAlterTableAdd() + alteration = p.parseAlterTableAdd() case p.Token.IsKeywordLike("DROP"): - alternation = p.parseAlterTableDrop() + alteration = p.parseAlterTableDrop() case p.Token.IsKeywordLike("REPLACE"): - alternation = p.parseAlterTableReplace() + alteration = p.parseAlterTableReplace() case p.Token.Kind == "SET": - alternation = p.parseSetOnDelete() + alteration = p.parseSetOnDelete() case p.Token.IsKeywordLike("ALTER"): - alternation = p.parseAlterColumn() + alteration = p.parseAlterColumn() default: if p.Token.Kind == token.TokenIdent { p.panicfAtToken(&p.Token, "expected pseuso keyword: ADD, ALTER, DROP, but: %s", p.Token.AsString) @@ -2706,33 +2706,33 @@ func (p *Parser) parseAlterTable(pos token.Pos) *ast.AlterTable { return &ast.AlterTable{ Alter: pos, Name: name, - TableAlternation: alternation, + TableAlteration: alteration, } } -func (p *Parser) parseAlterTableAdd() ast.TableAlternation { +func (p *Parser) parseAlterTableAdd() ast.TableAlteration { pos := p.expectKeywordLike("ADD").Pos - var alternation ast.TableAlternation + var alteration ast.TableAlteration switch { case p.Token.IsKeywordLike("COLUMN"): p.expectKeywordLike("COLUMN") ifNotExists := p.parseIfNotExists() column := p.parseColumnDef() - alternation = &ast.AddColumn{ + alteration = &ast.AddColumn{ Add: pos, IfNotExists: ifNotExists, Column: column, } case p.Token.IsKeywordLike("CONSTRAINT"): - alternation = &ast.AddTableConstraint{ + alteration = &ast.AddTableConstraint{ Add: pos, TableConstraint: p.parseConstraint(), } case p.Token.IsKeywordLike("FOREIGN"): fk := p.parseForeignKey() - alternation = &ast.AddTableConstraint{ + alteration = &ast.AddTableConstraint{ Add: pos, TableConstraint: &ast.TableConstraint{ Constraint: fk, @@ -2740,7 +2740,7 @@ func (p *Parser) parseAlterTableAdd() ast.TableAlternation { } case p.Token.IsKeywordLike("CHECK"): c := p.parseCheck() - alternation = &ast.AddTableConstraint{ + alteration = &ast.AddTableConstraint{ Add: pos, TableConstraint: &ast.TableConstraint{ Constraint: c, @@ -2749,7 +2749,7 @@ func (p *Parser) parseAlterTableAdd() ast.TableAlternation { case p.Token.IsKeywordLike("ROW"): rdp := p.parseRowDeletionPolicy() - alternation = &ast.AddRowDeletionPolicy{ + alteration = &ast.AddRowDeletionPolicy{ Add: pos, RowDeletionPolicy: rdp, } @@ -2757,26 +2757,26 @@ func (p *Parser) parseAlterTableAdd() ast.TableAlternation { p.panicfAtToken(&p.Token, "expected pseuso keyword: COLUMN, CONSTRAINT, FOREIGN, but: %s", p.Token.AsString) } - return alternation + return alteration } -func (p *Parser) parseAlterTableDrop() ast.TableAlternation { +func (p *Parser) parseAlterTableDrop() ast.TableAlteration { pos := p.expectKeywordLike("DROP").Pos - var alternation ast.TableAlternation + var alteration ast.TableAlteration switch { case p.Token.IsKeywordLike("COLUMN"): p.expectKeywordLike("COLUMN") name := p.parseIdent() - alternation = &ast.DropColumn{ + alteration = &ast.DropColumn{ Drop: pos, Name: name, } case p.Token.IsKeywordLike("CONSTRAINT"): p.expectKeywordLike("CONSTRAINT") name := p.parseIdent() - alternation = &ast.DropConstraint{ + alteration = &ast.DropConstraint{ Drop: pos, Name: name, } @@ -2784,7 +2784,7 @@ func (p *Parser) parseAlterTableDrop() ast.TableAlternation { p.expectKeywordLike("ROW") p.expectKeywordLike("DELETION") policyPos := p.expectKeywordLike("POLICY").Pos - alternation = &ast.DropRowDeletionPolicy{ + alteration = &ast.DropRowDeletionPolicy{ Drop: pos, Policy: policyPos, } @@ -2792,10 +2792,10 @@ func (p *Parser) parseAlterTableDrop() ast.TableAlternation { p.panicfAtToken(&p.Token, "expected pseuso keyword: COLUMN, CONSTRAINT, but: %s", p.Token.AsString) } - return alternation + return alteration } -func (p *Parser) parseAlterTableReplace() ast.TableAlternation { +func (p *Parser) parseAlterTableReplace() ast.TableAlteration { pos := p.expectKeywordLike("REPLACE").Pos rdp := p.parseRowDeletionPolicy() @@ -2816,7 +2816,7 @@ func (p *Parser) parseSetOnDelete() *ast.SetOnDelete { } } -func (p *Parser) parseAlterColumn() ast.TableAlternation { +func (p *Parser) parseAlterColumn() ast.TableAlteration { pos := p.expectKeywordLike("ALTER").Pos p.expectKeywordLike("COLUMN") @@ -2858,12 +2858,12 @@ func (p *Parser) parseAlterIndex(pos token.Pos) *ast.AlterIndex { name := p.parseIdent() - var alternation ast.IndexAlternation + var alteration ast.IndexAlteration switch { case p.Token.IsKeywordLike("ADD"): - alternation = p.parseAddStoredColumn() + alteration = p.parseAddStoredColumn() case p.Token.IsKeywordLike("DROP"): - alternation = p.parseDropStoredColumn() + alteration = p.parseDropStoredColumn() default: p.panicfAtToken(&p.Token, "expected pseudo keyword: ADD, DROP, but: %s", p.Token.AsString) } @@ -2871,11 +2871,11 @@ func (p *Parser) parseAlterIndex(pos token.Pos) *ast.AlterIndex { return &ast.AlterIndex{ Alter: pos, Name: name, - IndexAlternation: alternation, + IndexAlteration: alteration, } } -func (p *Parser) parseAddStoredColumn() ast.IndexAlternation { +func (p *Parser) parseAddStoredColumn() ast.IndexAlteration { pos := p.expectKeywordLike("ADD").Pos p.expectKeywordLike("STORED") p.expectKeywordLike("COLUMN") @@ -2888,7 +2888,7 @@ func (p *Parser) parseAddStoredColumn() ast.IndexAlternation { } } -func (p *Parser) parseDropStoredColumn() ast.IndexAlternation { +func (p *Parser) parseDropStoredColumn() ast.IndexAlteration { pos := p.expectKeywordLike("DROP").Pos p.expectKeywordLike("STORED") p.expectKeywordLike("COLUMN") diff --git a/testdata/result/ddl/alter_change_stream_options.sql.txt b/testdata/result/ddl/alter_change_stream_options.sql.txt index 9d5a0911..29591d27 100644 --- a/testdata/result/ddl/alter_change_stream_options.sql.txt +++ b/testdata/result/ddl/alter_change_stream_options.sql.txt @@ -9,7 +9,7 @@ ALTER CHANGE STREAM change_stream_name SET OPTIONS (retention_period = '1d', val NameEnd: 38, Name: "change_stream_name", }, - ChangeStreamAlternation: &ast.ChangeStreamSetOptions{ + ChangeStreamAlteration: &ast.ChangeStreamSetOptions{ Set: 39, Options: &ast.ChangeStreamOptions{ Options: 43, diff --git a/testdata/result/ddl/alter_change_stream_set_drop_for_all.sql.txt b/testdata/result/ddl/alter_change_stream_set_drop_for_all.sql.txt index b8c4b40a..78744030 100644 --- a/testdata/result/ddl/alter_change_stream_set_drop_for_all.sql.txt +++ b/testdata/result/ddl/alter_change_stream_set_drop_for_all.sql.txt @@ -9,7 +9,7 @@ ALTER CHANGE STREAM change_stream_name DROP FOR ALL NameEnd: 38, Name: "change_stream_name", }, - ChangeStreamAlternation: &ast.ChangeStreamDropForAll{ + ChangeStreamAlteration: &ast.ChangeStreamDropForAll{ Drop: 39, All: 48, }, diff --git a/testdata/result/ddl/alter_change_stream_set_for_all.sql.txt b/testdata/result/ddl/alter_change_stream_set_for_all.sql.txt index e6285a9a..93247c77 100644 --- a/testdata/result/ddl/alter_change_stream_set_for_all.sql.txt +++ b/testdata/result/ddl/alter_change_stream_set_for_all.sql.txt @@ -9,7 +9,7 @@ ALTER CHANGE STREAM change_stream_name SET FOR ALL NameEnd: 38, Name: "change_stream_name", }, - ChangeStreamAlternation: &ast.ChangeStreamSetFor{ + ChangeStreamAlteration: &ast.ChangeStreamSetFor{ Set: 39, For: &ast.ChangeStreamForAll{ For: 43, diff --git a/testdata/result/ddl/alter_change_stream_set_for_table_columns.sql.txt b/testdata/result/ddl/alter_change_stream_set_for_table_columns.sql.txt index 4d7bfc3a..ed5c412b 100644 --- a/testdata/result/ddl/alter_change_stream_set_for_table_columns.sql.txt +++ b/testdata/result/ddl/alter_change_stream_set_for_table_columns.sql.txt @@ -9,7 +9,7 @@ ALTER CHANGE STREAM change_stream_name SET FOR table_name1(column1, column2), ta NameEnd: 38, Name: "change_stream_name", }, - ChangeStreamAlternation: &ast.ChangeStreamSetFor{ + ChangeStreamAlteration: &ast.ChangeStreamSetFor{ Set: 39, For: &ast.ChangeStreamForTables{ For: 43, diff --git a/testdata/result/ddl/alter_index_add_stored_column.sql.txt b/testdata/result/ddl/alter_index_add_stored_column.sql.txt index 558262b9..c050f94b 100644 --- a/testdata/result/ddl/alter_index_add_stored_column.sql.txt +++ b/testdata/result/ddl/alter_index_add_stored_column.sql.txt @@ -9,7 +9,7 @@ alter index foo add stored column bar NameEnd: 15, Name: "foo", }, - IndexAlternation: &ast.AddStoredColumn{ + IndexAlteration: &ast.AddStoredColumn{ Add: 16, Name: &ast.Ident{ NamePos: 34, diff --git a/testdata/result/ddl/alter_index_drop_stored_column.sql.txt b/testdata/result/ddl/alter_index_drop_stored_column.sql.txt index cbad680e..0255727f 100644 --- a/testdata/result/ddl/alter_index_drop_stored_column.sql.txt +++ b/testdata/result/ddl/alter_index_drop_stored_column.sql.txt @@ -9,7 +9,7 @@ alter index foo drop stored column bar NameEnd: 15, Name: "foo", }, - IndexAlternation: &ast.DropStoredColumn{ + IndexAlteration: &ast.DropStoredColumn{ Drop: 16, Name: &ast.Ident{ NamePos: 35, diff --git a/testdata/result/ddl/alter_table_add_check.sql.txt b/testdata/result/ddl/alter_table_add_check.sql.txt index ac5c2b1c..24cf9b74 100644 --- a/testdata/result/ddl/alter_table_add_check.sql.txt +++ b/testdata/result/ddl/alter_table_add_check.sql.txt @@ -9,7 +9,7 @@ alter table foo add check (c1 > 0) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 0, diff --git a/testdata/result/ddl/alter_table_add_column.sql.txt b/testdata/result/ddl/alter_table_add_column.sql.txt index bdcaed80..b3003ef7 100644 --- a/testdata/result/ddl/alter_table_add_column.sql.txt +++ b/testdata/result/ddl/alter_table_add_column.sql.txt @@ -8,7 +8,7 @@ alter table foo add column baz string(max) not null NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddColumn{ + TableAlteration: &ast.AddColumn{ Add: 16, IfNotExists: false, Column: &ast.ColumnDef{ diff --git a/testdata/result/ddl/alter_table_add_column_if_not_exists.sql.txt b/testdata/result/ddl/alter_table_add_column_if_not_exists.sql.txt index 4f9cfad6..3d0c2760 100644 --- a/testdata/result/ddl/alter_table_add_column_if_not_exists.sql.txt +++ b/testdata/result/ddl/alter_table_add_column_if_not_exists.sql.txt @@ -9,7 +9,7 @@ alter table foo add column if not exists baz string(max) not null NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddColumn{ + TableAlteration: &ast.AddColumn{ Add: 16, IfNotExists: true, Column: &ast.ColumnDef{ diff --git a/testdata/result/ddl/alter_table_add_column_with_if_expression.sql.txt b/testdata/result/ddl/alter_table_add_column_with_if_expression.sql.txt index bba73728..72daf188 100644 --- a/testdata/result/ddl/alter_table_add_column_with_if_expression.sql.txt +++ b/testdata/result/ddl/alter_table_add_column_with_if_expression.sql.txt @@ -8,7 +8,7 @@ ALTER TABLE foo ADD COLUMN expired_at TIMESTAMP AS (IF (status != "OPEN" AND sta NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddColumn{ + TableAlteration: &ast.AddColumn{ Add: 16, IfNotExists: false, Column: &ast.ColumnDef{ diff --git a/testdata/result/ddl/alter_table_add_constraint_check.sql.txt b/testdata/result/ddl/alter_table_add_constraint_check.sql.txt index cc856f9f..8da98462 100644 --- a/testdata/result/ddl/alter_table_add_constraint_check.sql.txt +++ b/testdata/result/ddl/alter_table_add_constraint_check.sql.txt @@ -9,7 +9,7 @@ alter table foo add constraint cname check (c1 > 0) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 20, diff --git a/testdata/result/ddl/alter_table_add_constraint_foreign_key.sql.txt b/testdata/result/ddl/alter_table_add_constraint_foreign_key.sql.txt index 2f63b9a4..73755682 100644 --- a/testdata/result/ddl/alter_table_add_constraint_foreign_key.sql.txt +++ b/testdata/result/ddl/alter_table_add_constraint_foreign_key.sql.txt @@ -9,7 +9,7 @@ alter table foo add constraint fkname foreign key (foo, bar) references t2 (t2ke NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 20, diff --git a/testdata/result/ddl/alter_table_add_constraint_foreign_key_on_delete_cascade.sql.txt b/testdata/result/ddl/alter_table_add_constraint_foreign_key_on_delete_cascade.sql.txt index 1cfcc423..77fac40a 100644 --- a/testdata/result/ddl/alter_table_add_constraint_foreign_key_on_delete_cascade.sql.txt +++ b/testdata/result/ddl/alter_table_add_constraint_foreign_key_on_delete_cascade.sql.txt @@ -9,7 +9,7 @@ alter table foo add constraint fkname foreign key (foo, bar) references t2 (t2ke NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 20, diff --git a/testdata/result/ddl/alter_table_add_constraint_foreign_key_on_delete_no_action.sql.txt b/testdata/result/ddl/alter_table_add_constraint_foreign_key_on_delete_no_action.sql.txt index a9fde931..6a91159e 100644 --- a/testdata/result/ddl/alter_table_add_constraint_foreign_key_on_delete_no_action.sql.txt +++ b/testdata/result/ddl/alter_table_add_constraint_foreign_key_on_delete_no_action.sql.txt @@ -9,7 +9,7 @@ alter table foo add constraint fkname foreign key (foo, bar) references t2 (t2ke NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 20, diff --git a/testdata/result/ddl/alter_table_add_foreign_key.sql.txt b/testdata/result/ddl/alter_table_add_foreign_key.sql.txt index 7bf717f3..6f40ab66 100644 --- a/testdata/result/ddl/alter_table_add_foreign_key.sql.txt +++ b/testdata/result/ddl/alter_table_add_foreign_key.sql.txt @@ -9,7 +9,7 @@ alter table foo add foreign key (bar) references t2 (t2key1) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 0, diff --git a/testdata/result/ddl/alter_table_add_row_deletion_policy.sql.txt b/testdata/result/ddl/alter_table_add_row_deletion_policy.sql.txt index a50e2466..f04597c6 100644 --- a/testdata/result/ddl/alter_table_add_row_deletion_policy.sql.txt +++ b/testdata/result/ddl/alter_table_add_row_deletion_policy.sql.txt @@ -9,7 +9,7 @@ alter table foo add row deletion policy ( older_than ( bar, interval 30 day )) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddRowDeletionPolicy{ + TableAlteration: &ast.AddRowDeletionPolicy{ Add: 16, RowDeletionPolicy: &ast.RowDeletionPolicy{ Row: 20, diff --git a/testdata/result/ddl/alter_table_alter_column.sql.txt b/testdata/result/ddl/alter_table_alter_column.sql.txt index 4f0202c3..dedb4bee 100644 --- a/testdata/result/ddl/alter_table_alter_column.sql.txt +++ b/testdata/result/ddl/alter_table_alter_column.sql.txt @@ -8,7 +8,7 @@ alter table foo alter column foo string(256) not null NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AlterColumn{ + TableAlteration: &ast.AlterColumn{ Alter: 16, Null: 49, Name: &ast.Ident{ diff --git a/testdata/result/ddl/alter_table_alter_column_set.sql.txt b/testdata/result/ddl/alter_table_alter_column_set.sql.txt index cafced18..9b7245de 100644 --- a/testdata/result/ddl/alter_table_alter_column_set.sql.txt +++ b/testdata/result/ddl/alter_table_alter_column_set.sql.txt @@ -8,7 +8,7 @@ alter table foo alter column foo set options(allow_commit_timestamp = true) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AlterColumnSet{ + TableAlteration: &ast.AlterColumnSet{ Alter: 16, Name: &ast.Ident{ NamePos: 29, diff --git a/testdata/result/ddl/alter_table_alter_column_set_default.sql.txt b/testdata/result/ddl/alter_table_alter_column_set_default.sql.txt index 4c7e3a10..33148d04 100644 --- a/testdata/result/ddl/alter_table_alter_column_set_default.sql.txt +++ b/testdata/result/ddl/alter_table_alter_column_set_default.sql.txt @@ -8,7 +8,7 @@ ALTER TABLE actions ALTER COLUMN output SET DEFAULT("") NameEnd: 19, Name: "actions", }, - TableAlternation: &ast.AlterColumnSet{ + TableAlteration: &ast.AlterColumnSet{ Alter: 20, Name: &ast.Ident{ NamePos: 33, diff --git a/testdata/result/ddl/alter_table_alter_column_with_default.sql.txt b/testdata/result/ddl/alter_table_alter_column_with_default.sql.txt index 8483000b..3578bfd0 100644 --- a/testdata/result/ddl/alter_table_alter_column_with_default.sql.txt +++ b/testdata/result/ddl/alter_table_alter_column_with_default.sql.txt @@ -8,7 +8,7 @@ ALTER TABLE actions ALTER COLUMN output STRING(MAX) NOT NULL DEFAULT("") NameEnd: 19, Name: "actions", }, - TableAlternation: &ast.AlterColumn{ + TableAlteration: &ast.AlterColumn{ Alter: 20, Null: 56, Name: &ast.Ident{ diff --git a/testdata/result/ddl/alter_table_drop_column.sql.txt b/testdata/result/ddl/alter_table_drop_column.sql.txt index 27f85353..a6d50896 100644 --- a/testdata/result/ddl/alter_table_drop_column.sql.txt +++ b/testdata/result/ddl/alter_table_drop_column.sql.txt @@ -9,7 +9,7 @@ alter table foo drop column bar NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.DropColumn{ + TableAlteration: &ast.DropColumn{ Drop: 16, Name: &ast.Ident{ NamePos: 28, diff --git a/testdata/result/ddl/alter_table_drop_constraint.sql.txt b/testdata/result/ddl/alter_table_drop_constraint.sql.txt index 863b8c92..70f07651 100644 --- a/testdata/result/ddl/alter_table_drop_constraint.sql.txt +++ b/testdata/result/ddl/alter_table_drop_constraint.sql.txt @@ -9,7 +9,7 @@ alter table foo drop constraint bar NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.DropConstraint{ + TableAlteration: &ast.DropConstraint{ Drop: 16, Name: &ast.Ident{ NamePos: 32, diff --git a/testdata/result/ddl/alter_table_drop_row_deletion_policy.sql.txt b/testdata/result/ddl/alter_table_drop_row_deletion_policy.sql.txt index dab14bb4..c3a12441 100644 --- a/testdata/result/ddl/alter_table_drop_row_deletion_policy.sql.txt +++ b/testdata/result/ddl/alter_table_drop_row_deletion_policy.sql.txt @@ -9,7 +9,7 @@ alter table foo drop row deletion policy NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.DropRowDeletionPolicy{ + TableAlteration: &ast.DropRowDeletionPolicy{ Drop: 16, Policy: 34, }, diff --git a/testdata/result/ddl/alter_table_replace_row_deletion_policy.sql.txt b/testdata/result/ddl/alter_table_replace_row_deletion_policy.sql.txt index 0ea5e705..ab3d3733 100644 --- a/testdata/result/ddl/alter_table_replace_row_deletion_policy.sql.txt +++ b/testdata/result/ddl/alter_table_replace_row_deletion_policy.sql.txt @@ -9,7 +9,7 @@ alter table foo replace row deletion policy ( older_than ( bar, interval 30 day NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.ReplaceRowDeletionPolicy{ + TableAlteration: &ast.ReplaceRowDeletionPolicy{ Replace: 16, RowDeletionPolicy: &ast.RowDeletionPolicy{ Row: 24, diff --git a/testdata/result/ddl/alter_table_set_on_delete.sql.txt b/testdata/result/ddl/alter_table_set_on_delete.sql.txt index bb416d9e..9817f838 100644 --- a/testdata/result/ddl/alter_table_set_on_delete.sql.txt +++ b/testdata/result/ddl/alter_table_set_on_delete.sql.txt @@ -8,7 +8,7 @@ alter table foo set on delete cascade NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.SetOnDelete{ + TableAlteration: &ast.SetOnDelete{ Set: 16, OnDeleteEnd: 37, OnDelete: "ON DELETE CASCADE", diff --git a/testdata/result/ddl/alter_table_set_on_delete_no_action.sql.txt b/testdata/result/ddl/alter_table_set_on_delete_no_action.sql.txt index 89a03a5d..bd058cad 100644 --- a/testdata/result/ddl/alter_table_set_on_delete_no_action.sql.txt +++ b/testdata/result/ddl/alter_table_set_on_delete_no_action.sql.txt @@ -8,7 +8,7 @@ alter table foo set on delete no action NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.SetOnDelete{ + TableAlteration: &ast.SetOnDelete{ Set: 16, OnDeleteEnd: 39, OnDelete: "ON DELETE NO ACTION", diff --git a/testdata/result/statement/alter_change_stream_options.sql.txt b/testdata/result/statement/alter_change_stream_options.sql.txt index 9d5a0911..29591d27 100644 --- a/testdata/result/statement/alter_change_stream_options.sql.txt +++ b/testdata/result/statement/alter_change_stream_options.sql.txt @@ -9,7 +9,7 @@ ALTER CHANGE STREAM change_stream_name SET OPTIONS (retention_period = '1d', val NameEnd: 38, Name: "change_stream_name", }, - ChangeStreamAlternation: &ast.ChangeStreamSetOptions{ + ChangeStreamAlteration: &ast.ChangeStreamSetOptions{ Set: 39, Options: &ast.ChangeStreamOptions{ Options: 43, diff --git a/testdata/result/statement/alter_change_stream_set_drop_for_all.sql.txt b/testdata/result/statement/alter_change_stream_set_drop_for_all.sql.txt index b8c4b40a..78744030 100644 --- a/testdata/result/statement/alter_change_stream_set_drop_for_all.sql.txt +++ b/testdata/result/statement/alter_change_stream_set_drop_for_all.sql.txt @@ -9,7 +9,7 @@ ALTER CHANGE STREAM change_stream_name DROP FOR ALL NameEnd: 38, Name: "change_stream_name", }, - ChangeStreamAlternation: &ast.ChangeStreamDropForAll{ + ChangeStreamAlteration: &ast.ChangeStreamDropForAll{ Drop: 39, All: 48, }, diff --git a/testdata/result/statement/alter_change_stream_set_for_all.sql.txt b/testdata/result/statement/alter_change_stream_set_for_all.sql.txt index e6285a9a..93247c77 100644 --- a/testdata/result/statement/alter_change_stream_set_for_all.sql.txt +++ b/testdata/result/statement/alter_change_stream_set_for_all.sql.txt @@ -9,7 +9,7 @@ ALTER CHANGE STREAM change_stream_name SET FOR ALL NameEnd: 38, Name: "change_stream_name", }, - ChangeStreamAlternation: &ast.ChangeStreamSetFor{ + ChangeStreamAlteration: &ast.ChangeStreamSetFor{ Set: 39, For: &ast.ChangeStreamForAll{ For: 43, diff --git a/testdata/result/statement/alter_change_stream_set_for_table_columns.sql.txt b/testdata/result/statement/alter_change_stream_set_for_table_columns.sql.txt index 4d7bfc3a..ed5c412b 100644 --- a/testdata/result/statement/alter_change_stream_set_for_table_columns.sql.txt +++ b/testdata/result/statement/alter_change_stream_set_for_table_columns.sql.txt @@ -9,7 +9,7 @@ ALTER CHANGE STREAM change_stream_name SET FOR table_name1(column1, column2), ta NameEnd: 38, Name: "change_stream_name", }, - ChangeStreamAlternation: &ast.ChangeStreamSetFor{ + ChangeStreamAlteration: &ast.ChangeStreamSetFor{ Set: 39, For: &ast.ChangeStreamForTables{ For: 43, diff --git a/testdata/result/statement/alter_index_add_stored_column.sql.txt b/testdata/result/statement/alter_index_add_stored_column.sql.txt index 558262b9..c050f94b 100644 --- a/testdata/result/statement/alter_index_add_stored_column.sql.txt +++ b/testdata/result/statement/alter_index_add_stored_column.sql.txt @@ -9,7 +9,7 @@ alter index foo add stored column bar NameEnd: 15, Name: "foo", }, - IndexAlternation: &ast.AddStoredColumn{ + IndexAlteration: &ast.AddStoredColumn{ Add: 16, Name: &ast.Ident{ NamePos: 34, diff --git a/testdata/result/statement/alter_index_drop_stored_column.sql.txt b/testdata/result/statement/alter_index_drop_stored_column.sql.txt index cbad680e..0255727f 100644 --- a/testdata/result/statement/alter_index_drop_stored_column.sql.txt +++ b/testdata/result/statement/alter_index_drop_stored_column.sql.txt @@ -9,7 +9,7 @@ alter index foo drop stored column bar NameEnd: 15, Name: "foo", }, - IndexAlternation: &ast.DropStoredColumn{ + IndexAlteration: &ast.DropStoredColumn{ Drop: 16, Name: &ast.Ident{ NamePos: 35, diff --git a/testdata/result/statement/alter_table_add_check.sql.txt b/testdata/result/statement/alter_table_add_check.sql.txt index ac5c2b1c..24cf9b74 100644 --- a/testdata/result/statement/alter_table_add_check.sql.txt +++ b/testdata/result/statement/alter_table_add_check.sql.txt @@ -9,7 +9,7 @@ alter table foo add check (c1 > 0) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 0, diff --git a/testdata/result/statement/alter_table_add_column.sql.txt b/testdata/result/statement/alter_table_add_column.sql.txt index bdcaed80..b3003ef7 100644 --- a/testdata/result/statement/alter_table_add_column.sql.txt +++ b/testdata/result/statement/alter_table_add_column.sql.txt @@ -8,7 +8,7 @@ alter table foo add column baz string(max) not null NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddColumn{ + TableAlteration: &ast.AddColumn{ Add: 16, IfNotExists: false, Column: &ast.ColumnDef{ diff --git a/testdata/result/statement/alter_table_add_column_if_not_exists.sql.txt b/testdata/result/statement/alter_table_add_column_if_not_exists.sql.txt index 4f9cfad6..3d0c2760 100644 --- a/testdata/result/statement/alter_table_add_column_if_not_exists.sql.txt +++ b/testdata/result/statement/alter_table_add_column_if_not_exists.sql.txt @@ -9,7 +9,7 @@ alter table foo add column if not exists baz string(max) not null NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddColumn{ + TableAlteration: &ast.AddColumn{ Add: 16, IfNotExists: true, Column: &ast.ColumnDef{ diff --git a/testdata/result/statement/alter_table_add_column_with_if_expression.sql.txt b/testdata/result/statement/alter_table_add_column_with_if_expression.sql.txt index bba73728..72daf188 100644 --- a/testdata/result/statement/alter_table_add_column_with_if_expression.sql.txt +++ b/testdata/result/statement/alter_table_add_column_with_if_expression.sql.txt @@ -8,7 +8,7 @@ ALTER TABLE foo ADD COLUMN expired_at TIMESTAMP AS (IF (status != "OPEN" AND sta NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddColumn{ + TableAlteration: &ast.AddColumn{ Add: 16, IfNotExists: false, Column: &ast.ColumnDef{ diff --git a/testdata/result/statement/alter_table_add_constraint_check.sql.txt b/testdata/result/statement/alter_table_add_constraint_check.sql.txt index cc856f9f..8da98462 100644 --- a/testdata/result/statement/alter_table_add_constraint_check.sql.txt +++ b/testdata/result/statement/alter_table_add_constraint_check.sql.txt @@ -9,7 +9,7 @@ alter table foo add constraint cname check (c1 > 0) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 20, diff --git a/testdata/result/statement/alter_table_add_constraint_foreign_key.sql.txt b/testdata/result/statement/alter_table_add_constraint_foreign_key.sql.txt index 2f63b9a4..73755682 100644 --- a/testdata/result/statement/alter_table_add_constraint_foreign_key.sql.txt +++ b/testdata/result/statement/alter_table_add_constraint_foreign_key.sql.txt @@ -9,7 +9,7 @@ alter table foo add constraint fkname foreign key (foo, bar) references t2 (t2ke NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 20, diff --git a/testdata/result/statement/alter_table_add_constraint_foreign_key_on_delete_cascade.sql.txt b/testdata/result/statement/alter_table_add_constraint_foreign_key_on_delete_cascade.sql.txt index 1cfcc423..77fac40a 100644 --- a/testdata/result/statement/alter_table_add_constraint_foreign_key_on_delete_cascade.sql.txt +++ b/testdata/result/statement/alter_table_add_constraint_foreign_key_on_delete_cascade.sql.txt @@ -9,7 +9,7 @@ alter table foo add constraint fkname foreign key (foo, bar) references t2 (t2ke NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 20, diff --git a/testdata/result/statement/alter_table_add_constraint_foreign_key_on_delete_no_action.sql.txt b/testdata/result/statement/alter_table_add_constraint_foreign_key_on_delete_no_action.sql.txt index a9fde931..6a91159e 100644 --- a/testdata/result/statement/alter_table_add_constraint_foreign_key_on_delete_no_action.sql.txt +++ b/testdata/result/statement/alter_table_add_constraint_foreign_key_on_delete_no_action.sql.txt @@ -9,7 +9,7 @@ alter table foo add constraint fkname foreign key (foo, bar) references t2 (t2ke NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 20, diff --git a/testdata/result/statement/alter_table_add_foreign_key.sql.txt b/testdata/result/statement/alter_table_add_foreign_key.sql.txt index 7bf717f3..6f40ab66 100644 --- a/testdata/result/statement/alter_table_add_foreign_key.sql.txt +++ b/testdata/result/statement/alter_table_add_foreign_key.sql.txt @@ -9,7 +9,7 @@ alter table foo add foreign key (bar) references t2 (t2key1) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddTableConstraint{ + TableAlteration: &ast.AddTableConstraint{ Add: 16, TableConstraint: &ast.TableConstraint{ ConstraintPos: 0, diff --git a/testdata/result/statement/alter_table_add_row_deletion_policy.sql.txt b/testdata/result/statement/alter_table_add_row_deletion_policy.sql.txt index a50e2466..f04597c6 100644 --- a/testdata/result/statement/alter_table_add_row_deletion_policy.sql.txt +++ b/testdata/result/statement/alter_table_add_row_deletion_policy.sql.txt @@ -9,7 +9,7 @@ alter table foo add row deletion policy ( older_than ( bar, interval 30 day )) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AddRowDeletionPolicy{ + TableAlteration: &ast.AddRowDeletionPolicy{ Add: 16, RowDeletionPolicy: &ast.RowDeletionPolicy{ Row: 20, diff --git a/testdata/result/statement/alter_table_alter_column.sql.txt b/testdata/result/statement/alter_table_alter_column.sql.txt index 4f0202c3..dedb4bee 100644 --- a/testdata/result/statement/alter_table_alter_column.sql.txt +++ b/testdata/result/statement/alter_table_alter_column.sql.txt @@ -8,7 +8,7 @@ alter table foo alter column foo string(256) not null NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AlterColumn{ + TableAlteration: &ast.AlterColumn{ Alter: 16, Null: 49, Name: &ast.Ident{ diff --git a/testdata/result/statement/alter_table_alter_column_set.sql.txt b/testdata/result/statement/alter_table_alter_column_set.sql.txt index cafced18..9b7245de 100644 --- a/testdata/result/statement/alter_table_alter_column_set.sql.txt +++ b/testdata/result/statement/alter_table_alter_column_set.sql.txt @@ -8,7 +8,7 @@ alter table foo alter column foo set options(allow_commit_timestamp = true) NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.AlterColumnSet{ + TableAlteration: &ast.AlterColumnSet{ Alter: 16, Name: &ast.Ident{ NamePos: 29, diff --git a/testdata/result/statement/alter_table_alter_column_set_default.sql.txt b/testdata/result/statement/alter_table_alter_column_set_default.sql.txt index 4c7e3a10..33148d04 100644 --- a/testdata/result/statement/alter_table_alter_column_set_default.sql.txt +++ b/testdata/result/statement/alter_table_alter_column_set_default.sql.txt @@ -8,7 +8,7 @@ ALTER TABLE actions ALTER COLUMN output SET DEFAULT("") NameEnd: 19, Name: "actions", }, - TableAlternation: &ast.AlterColumnSet{ + TableAlteration: &ast.AlterColumnSet{ Alter: 20, Name: &ast.Ident{ NamePos: 33, diff --git a/testdata/result/statement/alter_table_alter_column_with_default.sql.txt b/testdata/result/statement/alter_table_alter_column_with_default.sql.txt index 8483000b..3578bfd0 100644 --- a/testdata/result/statement/alter_table_alter_column_with_default.sql.txt +++ b/testdata/result/statement/alter_table_alter_column_with_default.sql.txt @@ -8,7 +8,7 @@ ALTER TABLE actions ALTER COLUMN output STRING(MAX) NOT NULL DEFAULT("") NameEnd: 19, Name: "actions", }, - TableAlternation: &ast.AlterColumn{ + TableAlteration: &ast.AlterColumn{ Alter: 20, Null: 56, Name: &ast.Ident{ diff --git a/testdata/result/statement/alter_table_drop_column.sql.txt b/testdata/result/statement/alter_table_drop_column.sql.txt index 27f85353..a6d50896 100644 --- a/testdata/result/statement/alter_table_drop_column.sql.txt +++ b/testdata/result/statement/alter_table_drop_column.sql.txt @@ -9,7 +9,7 @@ alter table foo drop column bar NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.DropColumn{ + TableAlteration: &ast.DropColumn{ Drop: 16, Name: &ast.Ident{ NamePos: 28, diff --git a/testdata/result/statement/alter_table_drop_constraint.sql.txt b/testdata/result/statement/alter_table_drop_constraint.sql.txt index 863b8c92..70f07651 100644 --- a/testdata/result/statement/alter_table_drop_constraint.sql.txt +++ b/testdata/result/statement/alter_table_drop_constraint.sql.txt @@ -9,7 +9,7 @@ alter table foo drop constraint bar NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.DropConstraint{ + TableAlteration: &ast.DropConstraint{ Drop: 16, Name: &ast.Ident{ NamePos: 32, diff --git a/testdata/result/statement/alter_table_drop_row_deletion_policy.sql.txt b/testdata/result/statement/alter_table_drop_row_deletion_policy.sql.txt index dab14bb4..c3a12441 100644 --- a/testdata/result/statement/alter_table_drop_row_deletion_policy.sql.txt +++ b/testdata/result/statement/alter_table_drop_row_deletion_policy.sql.txt @@ -9,7 +9,7 @@ alter table foo drop row deletion policy NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.DropRowDeletionPolicy{ + TableAlteration: &ast.DropRowDeletionPolicy{ Drop: 16, Policy: 34, }, diff --git a/testdata/result/statement/alter_table_replace_row_deletion_policy.sql.txt b/testdata/result/statement/alter_table_replace_row_deletion_policy.sql.txt index 0ea5e705..ab3d3733 100644 --- a/testdata/result/statement/alter_table_replace_row_deletion_policy.sql.txt +++ b/testdata/result/statement/alter_table_replace_row_deletion_policy.sql.txt @@ -9,7 +9,7 @@ alter table foo replace row deletion policy ( older_than ( bar, interval 30 day NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.ReplaceRowDeletionPolicy{ + TableAlteration: &ast.ReplaceRowDeletionPolicy{ Replace: 16, RowDeletionPolicy: &ast.RowDeletionPolicy{ Row: 24, diff --git a/testdata/result/statement/alter_table_set_on_delete.sql.txt b/testdata/result/statement/alter_table_set_on_delete.sql.txt index bb416d9e..9817f838 100644 --- a/testdata/result/statement/alter_table_set_on_delete.sql.txt +++ b/testdata/result/statement/alter_table_set_on_delete.sql.txt @@ -8,7 +8,7 @@ alter table foo set on delete cascade NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.SetOnDelete{ + TableAlteration: &ast.SetOnDelete{ Set: 16, OnDeleteEnd: 37, OnDelete: "ON DELETE CASCADE", diff --git a/testdata/result/statement/alter_table_set_on_delete_no_action.sql.txt b/testdata/result/statement/alter_table_set_on_delete_no_action.sql.txt index 89a03a5d..bd058cad 100644 --- a/testdata/result/statement/alter_table_set_on_delete_no_action.sql.txt +++ b/testdata/result/statement/alter_table_set_on_delete_no_action.sql.txt @@ -8,7 +8,7 @@ alter table foo set on delete no action NameEnd: 15, Name: "foo", }, - TableAlternation: &ast.SetOnDelete{ + TableAlteration: &ast.SetOnDelete{ Set: 16, OnDeleteEnd: 39, OnDelete: "ON DELETE NO ACTION",