@@ -45,18 +45,18 @@ pub enum AlterTableOperation {
45
45
/// <column_def>.
46
46
column_def : ColumnDef ,
47
47
} ,
48
- /// DISABLE TRIGGER [ trigger_name | ALL | USER ]
49
- /// DISABLE RULE rewrite_rule_name
50
- /// DISABLE ROW LEVEL SECURITY
48
+ /// `DISABLE ROW LEVEL SECURITY`
51
49
///
52
50
/// Note: this is a PostgreSQL-specific operation.
53
- DisableTrigger {
54
- name : Ident ,
55
- } ,
56
- DisableRule {
57
- name : Ident ,
58
- } ,
59
51
DisableRowLevelSecurity ,
52
+ /// `DISABLE RULE rewrite_rule_name`
53
+ ///
54
+ /// Note: this is a PostgreSQL-specific operation.
55
+ DisableRule { name : Ident } ,
56
+ /// `DISABLE TRIGGER [ trigger_name | ALL | USER ]`
57
+ ///
58
+ /// Note: this is a PostgreSQL-specific operation.
59
+ DisableTrigger { name : Ident } ,
60
60
/// `DROP CONSTRAINT [ IF EXISTS ] <name>`
61
61
DropConstraint {
62
62
if_exists : bool ,
@@ -73,47 +73,34 @@ pub enum AlterTableOperation {
73
73
///
74
74
/// Note: this is a MySQL-specific operation.
75
75
DropPrimaryKey ,
76
-
77
- /// `ENABLE TRIGGER [ trigger_name | ALL | USER ]`
76
+ /// `ENABLE ALWAYS RULE rewrite_rule_name`
78
77
///
79
78
/// Note: this is a PostgreSQL-specific operation.
80
- EnableTrigger {
81
- name : Ident ,
82
- } ,
83
- /// `ENABLE RULE rewrite_rule_name`
79
+ EnableAlwaysRule { name : Ident } ,
80
+ /// `ENABLE ALWAYS TRIGGER trigger_name`
84
81
///
85
82
/// Note: this is a PostgreSQL-specific operation.
86
- EnableRule {
87
- name : Ident ,
88
- } ,
89
- /// `ENABLE ROW LEVEL SECURITY`
83
+ EnableAlwaysTrigger { name : Ident } ,
84
+ /// `ENABLE REPLICA RULE rewrite_rule_name`
90
85
///
91
86
/// Note: this is a PostgreSQL-specific operation.
92
- EnableRowLevelSecurity ,
87
+ EnableReplicaRule { name : Ident } ,
93
88
/// `ENABLE REPLICA TRIGGER trigger_name`
94
89
///
95
90
/// Note: this is a PostgreSQL-specific operation.
96
- EnableReplicaTrigger {
97
- name : Ident ,
98
- } ,
99
- /// `ENABLE ALWAYS TRIGGER trigger_name`
91
+ EnableReplicaTrigger { name : Ident } ,
92
+ /// `ENABLE ROW LEVEL SECURITY`
100
93
///
101
94
/// Note: this is a PostgreSQL-specific operation.
102
- EnableAlwaysTrigger {
103
- name : Ident ,
104
- } ,
105
- /// `ENABLE REPLICA RULE rewrite_rule_name`
95
+ EnableRowLevelSecurity ,
96
+ /// `ENABLE RULE rewrite_rule_name`
106
97
///
107
98
/// Note: this is a PostgreSQL-specific operation.
108
- EnableReplicaRule {
109
- name : Ident ,
110
- } ,
111
- /// `ENABLE ALWAYS RULE rewrite_rule_name`
99
+ EnableRule { name : Ident } ,
100
+ /// `ENABLE TRIGGER [ trigger_name | ALL | USER ]`
112
101
///
113
102
/// Note: this is a PostgreSQL-specific operation.
114
- EnableAlwaysRule {
115
- name : Ident ,
116
- } ,
103
+ EnableTrigger { name : Ident } ,
117
104
/// `RENAME TO PARTITION (partition=val)`
118
105
RenamePartitions {
119
106
old_partitions : Vec < Expr > ,
@@ -134,9 +121,7 @@ pub enum AlterTableOperation {
134
121
new_column_name : Ident ,
135
122
} ,
136
123
/// `RENAME TO <table_name>`
137
- RenameTable {
138
- table_name : ObjectName ,
139
- } ,
124
+ RenameTable { table_name : ObjectName } ,
140
125
// CHANGE [ COLUMN ] <old_name> <new_name> <data_type> [ <options> ]
141
126
ChangeColumn {
142
127
old_name : Ident ,
@@ -147,10 +132,7 @@ pub enum AlterTableOperation {
147
132
/// `RENAME CONSTRAINT <old_constraint_name> TO <new_constraint_name>`
148
133
///
149
134
/// Note: this is a PostgreSQL-specific operation.
150
- RenameConstraint {
151
- old_name : Ident ,
152
- new_name : Ident ,
153
- } ,
135
+ RenameConstraint { old_name : Ident , new_name : Ident } ,
154
136
/// `ALTER [ COLUMN ]`
155
137
AlterColumn {
156
138
column_name : Ident ,
@@ -159,9 +141,7 @@ pub enum AlterTableOperation {
159
141
/// 'SWAP WITH <table_name>'
160
142
///
161
143
/// Note: this is Snowflake specific <https://docs.snowflake.com/en/sql-reference/sql/alter-table>
162
- SwapWith {
163
- table_name : ObjectName ,
164
- } ,
144
+ SwapWith { table_name : ObjectName } ,
165
145
}
166
146
167
147
#[ derive( Debug , Clone , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
0 commit comments