1 /*
2  * Copyright 2015-2018 HuntLabs.cn
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 module hunt.sql.dialect.mysql.ast.statement.MySqlAlterTableModifyColumn;
17 
18 import hunt.sql.ast.SQLExpr;
19 import hunt.sql.ast.SQLName;
20 import hunt.sql.ast.statement.SQLAlterTableItem;
21 import hunt.sql.ast.statement.SQLColumnDefinition;
22 import hunt.sql.dialect.mysql.ast.MySqlObjectImpl;
23 import hunt.sql.dialect.mysql.visitor.MySqlASTVisitor;
24 
25 public class MySqlAlterTableModifyColumn : MySqlObjectImpl , SQLAlterTableItem {
26 
27     alias accept0 = MySqlObjectImpl.accept0;
28     
29     private SQLColumnDefinition newColumnDefinition;
30 
31     private bool             first;
32 
33     private SQLName             firstColumn;
34     private SQLName             afterColumn;
35 
36     override
37     public void accept0(MySqlASTVisitor visitor) {
38         if (visitor.visit(this)) {
39             acceptChild(visitor, newColumnDefinition);
40 
41             acceptChild(visitor, firstColumn);
42             acceptChild(visitor, afterColumn);
43         }
44     }
45 
46     public SQLName getFirstColumn() {
47         return firstColumn;
48     }
49 
50     public void setFirstColumn(SQLName firstColumn) {
51         this.firstColumn = firstColumn;
52     }
53 
54     public SQLName getAfterColumn() {
55         return afterColumn;
56     }
57 
58     public void setAfterColumn(SQLName afterColumn) {
59         this.afterColumn = afterColumn;
60     }
61 
62     public SQLColumnDefinition getNewColumnDefinition() {
63         return newColumnDefinition;
64     }
65 
66     public void setNewColumnDefinition(SQLColumnDefinition newColumnDefinition) {
67         this.newColumnDefinition = newColumnDefinition;
68     }
69 
70     public bool isFirst() {
71         return first;
72     }
73 
74     public void setFirst(bool first) {
75         this.first = first;
76     }
77 
78 }